aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_set/builder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_set/builder.rb b/activerecord/lib/active_record/attribute_set/builder.rb
index 05138ae36d..3a76f5262d 100644
--- a/activerecord/lib/active_record/attribute_set/builder.rb
+++ b/activerecord/lib/active_record/attribute_set/builder.rb
@@ -76,7 +76,9 @@ module ActiveRecord
unless @materialized
values.each_key { |key| self[key] }
types.each_key { |key| self[key] }
- @materialized = true
+ unless frozen?
+ @materialized = true
+ end
end
delegate_hash
end