diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 17:37:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 17:37:55 -0700 |
commit | 78b6f6410522fa634b639645e7f53bca31f5bccc (patch) | |
tree | 68e9d5b5713a5aed4ed5f6166671dd1e0ce7628d /activerecord/lib | |
parent | d2898d4ef80dc74ef0d6204b5c7f50877659e50e (diff) | |
download | rails-78b6f6410522fa634b639645e7f53bca31f5bccc.tar.gz rails-78b6f6410522fa634b639645e7f53bca31f5bccc.tar.bz2 rails-78b6f6410522fa634b639645e7f53bca31f5bccc.zip |
avoid creating a proc object when possible
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 59ce76ea42..e8bd4dc485 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -117,8 +117,8 @@ module ActiveRecord relation end - def extending(*modules, &block) - modules << Module.new(&block) if block_given? + def extending(*modules) + modules << Module.new(&Proc.new) if block_given? relation = clone relation.send(:apply_modules, modules.flatten) |