Skip to content
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

Sometime module_eval can not be changed to define_method. #6

Closed
u2 opened this issue Feb 25, 2015 · 2 comments
Closed

Sometime module_eval can not be changed to define_method. #6

u2 opened this issue Feb 25, 2015 · 2 comments

Comments

@u2
Copy link

u2 commented Feb 25, 2015

I have play fasterer in my code.It point out Using module_eval is slower than define_method. Occured at lines: 50..But my code is something like that:

class Thing
 @foo = 'test'
end
Thing.module_eval {puts @foo}

It can not be changed to define_method in this situation.So, it think it should not give me the suggestion anywhere I using module_eval.

@DamirSvrtan
Copy link
Owner

Hey, thnx for reporting. I will try to change after we see what happens with this issue: fastruby/fast-ruby#22

@DamirSvrtan
Copy link
Owner

For now I've added a check to see if module_eval has a def inside of it. It's released in version 0.1.5.
I'm following the fast-ruby repository so if that changes i will remove it from fasterer.

Thnx for reporting.

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

No branches or pull requests

2 participants