diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-30 16:21:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-30 16:21:40 -0700 |
commit | 1468a4b89aa4bca99160bfa03572b2c0ab348db5 (patch) | |
tree | 121950f4e16ad41b2363d5ab03b087532abac9fc | |
parent | fa41836190d009baabedb48ac7740044681bccc2 (diff) | |
download | rails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.tar.gz rails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.tar.bz2 rails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.zip |
all `scope_chain` methods allocate new arrays, no need to dup
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 73d154e03e..2fa7b1194d 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -564,7 +564,7 @@ module ActiveRecord # of scopes corresponding to the chain. def scope_chain @scope_chain ||= begin - scope_chain = source_reflection.scope_chain.map(&:dup) + scope_chain = source_reflection.scope_chain # Add to it the scope from this reflection (if any) scope_chain.first << scope if scope |