Skip to content

Commit 5465c7d

Browse files
authored
Merge pull request rails#53331 from Shopify/speedup-attribute-set-deep-dup
Speedup AttributeSet#deep_dup
2 parents 0586c88 + 71ffcaf commit 5465c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activemodel/lib/active_model/attribute_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def freeze
7171
end
7272

7373
def deep_dup
74-
AttributeSet.new(attributes.deep_dup)
74+
AttributeSet.new(attributes.transform_values(&:deep_dup))
7575
end
7676

7777
def initialize_dup(_)

0 commit comments

Comments
 (0)