Merge pull request #26305 from kamipo/follow-up-to-26301
Switch back to `Hash.dup`
This commit is contained in:
commit
9aa6a75eef
@ -10,9 +10,7 @@ def initialize(klass, arel_table, association = nil)
|
||||
end
|
||||
|
||||
def resolve_column_aliases(hash)
|
||||
# This method is a hot spot, so for now, use Hash[] to dup the hash.
|
||||
# https://bugs.ruby-lang.org/issues/7166
|
||||
new_hash = Hash[hash]
|
||||
new_hash = hash.dup
|
||||
hash.each do |key, _|
|
||||
if (key.is_a?(Symbol)) && klass.attribute_alias?(key)
|
||||
new_hash[klass.attribute_alias(key)] = new_hash.delete(key)
|
||||
|
Loading…
Reference in New Issue
Block a user