When saving a frozen? record, active record would raise an exception to complain about the frozen attributes, rollback the transaction. However, it also has the side effect of unfreezing the record after the rollback. This behaviour is undesirable and incorrect (saving a frozen? record twice in a roll would fail for the first time and succeed in the second time). This patch fixes the bug by explicitly restoring the frozen? state after a rollback.
This is my first patch for rails, so I apologize in advance if this should go in master instead of 3-2-stable. I can reapply this to master if that's more appropriate.
Restore frozen state on rollback, fixes #6417