diff options
-rw-r--r-- | activerecord/lib/active_record/attribute_set.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_set.rb b/activerecord/lib/active_record/attribute_set.rb index 66b278219a..abe8e14f26 100644 --- a/activerecord/lib/active_record/attribute_set.rb +++ b/activerecord/lib/active_record/attribute_set.rb @@ -64,9 +64,7 @@ module ActiveRecord end def deep_dup - dup.tap do |copy| - copy.instance_variable_set(:@attributes, attributes.deep_dup) - end + self.class.new(attributes.deep_dup) end def initialize_dup(_) |