From afa510ed690119cc61e0681d494053de740c79c8 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 31 Jul 2013 18:08:58 -0700 Subject: Revert "all `scope_chain` methods allocate new arrays, no need to dup" This reverts commit 1468a4b89aa4bca99160bfa03572b2c0ab348db5. --- activerecord/lib/active_record/reflection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/reflection.rb') 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 -- cgit v1.2.3