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

simplify code with existing redefine_method #5689

Closed
wants to merge 1 commit into from

Conversation

janx
Copy link
Contributor

@janx janx commented Apr 1, 2012

No description provided.

@rafaelfranca
Copy link
Member

it uses a block rather than class_eval. And we prefer the former for performance.

@janx
Copy link
Contributor Author

janx commented May 16, 2012

If so what's the point of #redefine_method? Should it be removed?

I also doubt how much performance differences the change will cause.

@rafaelfranca
Copy link
Member

redefine_method is used in a lot of places so we can not remove it.

Since class_attribute is used in a lot of places in the Rails code we are trying to avoid changes that decreases the performance.

@janx
Copy link
Contributor Author

janx commented May 16, 2012

Make sense, thanks.

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.

None yet

2 participants