Skip to content

WIP: Removing string evals #848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 14, 2013
Merged

WIP: Removing string evals #848

merged 5 commits into from
Nov 14, 2013

Conversation

alindeman
Copy link
Contributor

No description provided.

@ghost ghost assigned alindeman Nov 13, 2013
This is because 1.8.7 does not allow block arguments to have default
values.
@xaviershay
Copy link
Member

I'd expect this to be faster, but did you benchmark it?

@myronmarston
Copy link
Member

I'd expect this to be faster, but did you benchmark it?

I certainly don't want to discourage benchmarking (more data is always nice!) but we've been changing all string evals to non-string evals for RSpec 3. I find the non-string form vastly easier to reason about and maintain, and Tenderlove's blog post dispels the common "dynamic methods defined with string evals are faster" advice I used to hear. In other words, I'm generally happy to switch to non-string eval w/o seeing a benchmark but would want to see one if someone wanted to switch to a string eval. YMMV, of course :).

@JonRowe
Copy link
Member

JonRowe commented Nov 14, 2013

This LGTM and I'm also in favour of converting away from string evals so also don't mind no benchmarking. Merge away in my books.

@fables-tales
Copy link
Member

We didn't benchmark this. I'm going to merge this as is, I agree with @myronmarston and @JonRowe that string evals are much harder to reason about than real block evals.

fables-tales pushed a commit that referenced this pull request Nov 14, 2013
@fables-tales fables-tales merged commit d21509b into master Nov 14, 2013
@fables-tales fables-tales deleted the remove-string-evals branch November 14, 2013 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants