Current activerecord validation implementation store string messages directly into the Error object.
This approach is simple and works, but it has some down sides.
Supposing you're testing your application and you want to assert against a specific error in the object. You'd usually do this:
assert_equal "can't be empty", errors.on(:some_attr)
By using the string message in comparison you're accepting the fact that if your message string change your test will be breaking. It would be easier to do:
assert_equal :empty, errors.on(:some_attr)
Where :empty is a identifier for the error message stored in ActiveRecord::Errors.default_error_messages
This is fully backward compatible, so if you have comparisons against string messages, it will also work.
There's a little difference in ActiveRecord::Errors#each. Instead of yielding the attribute and the message string, it will yield the attribute and a instance of ActiveRecord::Errors::ErrorMessage. But since ErroMessage#to_s will return the string message, you should be fine ;-)
I's pretty much only the internals that has changed and still have the same behaviour, so there're only few tests included. The current tests cover all the common behaviour.