mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #26301 from maclover7/jm-fix-comment
Switch back to `Hash.dup`
This commit is contained in:
commit
f3f8589f77
1 changed files with 2 additions and 4 deletions
|
@ -29,9 +29,7 @@ module ActiveRecord
|
|||
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 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def values
|
||||
Hash[@values]
|
||||
@values.dup
|
||||
end
|
||||
|
||||
def inspect
|
||||
|
|
Loading…
Reference in a new issue