Skip to content

simplify code with existing redefine_method #5689

Closed
wants to merge 1 commit into from

2 participants

@janx
janx commented Apr 1, 2012

No description provided.

@rafaelfranca
Ruby on Rails member

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

@janx
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
Ruby on Rails 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
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
Something went wrong with that request. Please try again.