From: Austin Ziegler Date: 2003-09-19T11:58:09+09:00 Subject: Re: madeleine + transaction::simple On Fri, 19 Sep 2003 10:37:05 +0900, Gavin Sinclair wrote: > On Friday, September 19, 2003, 7:44:07 AM, Austin wrote (in part): >> [Transaction::Simple] does not reuse the same object identifiers >> (unless the object responds to #replace), so anything that depends on >> #__id__ will break on a rewind or abort. > Does it concern you at all that an object might implement #replace but > with entirely different semantics? I know it's not that likely, but it's > worth considering. A bit. I believe that this would be fixed if, like, #__id__, we had #__replace__. If I don't test for #replace, though, I would have to do specific tests for String, Hash, and Array (and other items that support #replace). Maybe I'll test two things: respond_to?(:replace) and the #arity of the method (e.g., 1). Perhaps this would make a good RCR? Apparently, there's another method in 1.8 that I can use to reconstruct the object without messing up the #__id__ -- I just can't remember it offhand, and I haven't had time to look it up in the last two months of methods. If anyone can remember it, I'd appreciate it. I am going to be making a change to Transaction::Simple based on what Madeleine does, by offering alternatives to Marshal in the same way. It's a good enhancement, even if Marshal probably provides the most efficient way of handling the data. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.09.18 * 22.41.30