rails/rails — pull request #10058 by jamesgolick (2013-04-02 22:25:19+00:00)
Title: Avoid calling define_method in CollectionProxy#scope

Calling define_method busts the method cache, which has a major performance penalty. This refactoring avoids that in CollectionProxy#scope.