提交 d64732ec 编写于 作者: R Ryuta Kamizono

Switch back to `Hash.dup`

Follow up to #26301.
上级 cec60d39
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册