Permalink
Browse files

Revert "all `scope_chain` methods allocate new arrays, no need to dup"

This reverts commit 1468a4b.
  • Loading branch information...
1 parent 6da6341 commit afa510ed690119cc61e0681d494053de740c79c8 @tenderlove tenderlove committed Aug 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/reflection.rb
@@ -564,7 +564,7 @@ def chain
# 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

0 comments on commit afa510e

Please sign in to comment.