Permalink
Browse files

Merge pull request #26301 from maclover7/jm-fix-comment

Switch back to `Hash.dup`
  • Loading branch information...
guilleiguaran committed Aug 28, 2016
2 parents a63de6d + 79a2d07 commit f3f8589f7713fb6c8f5b69989ee09b0429121e76
Showing with 2 additions and 4 deletions.
  1. +2 −4 activerecord/lib/active_record/relation.rb
@@ -29,9 +29,7 @@ def initialize(klass, table, predicate_builder, values = {})
end
def initialize_copy(other)
# This method is a hot spot, so for now, use Hash[] to dup the hash.
# https://bugs.ruby-lang.org/issues/7166
@values = Hash[@values]
@values = @values.dup
reset
end
@@ -661,7 +659,7 @@ def blank?
end
def values
Hash[@values]
@values.dup
end
def inspect

0 comments on commit f3f8589

Please sign in to comment.