"Chuckl" <Killian2422 / yahoo.com> wrote in message

> I've also been thinking about deep_copy, but for a different reason. I
> want to keep a mutation log for each object instance. So if this
> occurs:
>
> foo = Obj.new(:blah)
> foo.warp_blah!
> foo.twist_blah = :different_blah
>
> Then somewhere, preferably abstracted inside each object instance, I'd
> have a log like:
>
> puts foo.mutation_log => ["wrap_blah!", ["twist_blah=",
> :different_blah]]
>
> When the method Obj.checkpoint is called, the log is cleared and the
> current state returned as a Marshall-ing, or some other store-savable
> format.

Madeline does something quite similar http://madeleine.sourceforge.net/ ...
may be worth a look.