small patch for attr_readonly

A small patch to fix attr_readonly when used in conjunction with
optimistic locking

Please Review:
http://dev.rubyonrails.org/ticket/10188

+1 if it works for you.

nick.

Committed. Thanks Nick!

jeremy