From: Tom Sawyer Date: 2003-01-05T06:03:06+09:00 Subject: Re: dump depth argument On Saturday 04 January 2003 06:11 am, Dossy wrote: > When using the version of Marshal#dump that takes anIO as an arg, I > noticed that it /does/ write to anIO up until the limit is reached. So, > if you rescue the exception, what's contained in anIO should be the > Marshalled result until the limit was hit. However, this won't do the > right thing in all cases: it seems to hard-stop at the /first/ member > variable that exceeds the depth. yes, i tried it and it bombs out. too bad it dosen't do all 1st level instances before going on the 2nd, etc. > Marshalling out an object with a soft limit is a bad idea, because the > subsequent Marshal#load won't produce an identical object as the one > that was Marshal#dump'ed. that's okay if you know exactly what to expect. so the option wouldn't hurt. > I always thought that one of the required properties of pushing an > object through Marshal#dump then Marshal#load is that it produces a deep > copy of the original object ... as long as cyclic references stay intact. the problem i was getting, was tthat marshal was actually copying cyclic references. according to matz that shouldn't happen. and subsequently the problem seems to have gone away. i wish i knew what had casued it.... -transami