Permalink
Browse files

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

  • Loading branch information...
1 parent fa41836 commit 1468a4b89aa4bca99160bfa03572b2c0ab348db5 @tenderlove tenderlove committed Jul 30, 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.map(&:dup)
+ scope_chain = source_reflection.scope_chain
# Add to it the scope from this reflection (if any)
scope_chain.first << scope if scope

1 comment on commit 1468a4b

@rafaelfranca
Member

This commit broke PostgreSQL tests https://travis-ci.org/rails/rails/builds/9672003

Please sign in to comment.