aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-30 16:21:33 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-30 16:21:40 -0700
commit1468a4b89aa4bca99160bfa03572b2c0ab348db5 (patch)
tree121950f4e16ad41b2363d5ab03b087532abac9fc /activerecord/lib/active_record/reflection.rb
parentfa41836190d009baabedb48ac7740044681bccc2 (diff)
downloadrails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.tar.gz
rails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.tar.bz2
rails-1468a4b89aa4bca99160bfa03572b2c0ab348db5.zip
all `scope_chain` methods allocate new arrays, no need to dup
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb2
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