mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
cb847b9f2e
Currently, when saving a frozen record, an exception would be thrown which causes a rollback. However, there is a bug in active record that "defrost" the record as a side effect: >> t = Topic.new => #<Topic id: nil, ...> >> t.freeze => #<Topic id: nil, ...> >> t.save RuntimeError: can't modify a frozen Hash >> t.frozen? => false >> t.save => true This patch fixes the bug by explictly restoring the frozen state on the attributes Hash after every rollback. |
||
---|---|---|
.. | ||
active_record | ||
rails/generators | ||
active_record.rb |