diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-31 18:08:58 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-31 18:08:58 -0700 |
commit | afa510ed690119cc61e0681d494053de740c79c8 (patch) | |
tree | d0d3f5271297cf68914174ea81aced3c321bf1d1 | |
parent | 6da63410cb69fa534e16f5a43aef77e73ddab4b2 (diff) | |
download | rails-afa510ed690119cc61e0681d494053de740c79c8.tar.gz rails-afa510ed690119cc61e0681d494053de740c79c8.tar.bz2 rails-afa510ed690119cc61e0681d494053de740c79c8.zip |
Revert "all `scope_chain` methods allocate new arrays, no need to dup"
This reverts commit 1468a4b89aa4bca99160bfa03572b2c0ab348db5.
-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 2fa7b1194d..73d154e03e 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 + scope_chain = source_reflection.scope_chain.map(&:dup) # Add to it the scope from this reflection (if any) scope_chain.first << scope if scope |