From: umptious@... Date: 2006-12-07T10:45:04+09:00 Subject: Re: Problem with Marshaling WeakRefs? Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Problem with Marshaling WeakRefs?" > on Thu, 7 Dec 2006 08:55:10 +0900, umptious@gmail.com writes: > > |I'm experimenting with Marshal, but I'm having problems making it work > |with data structures that use WeakRefs. Marshal saves without > |complaining, but the WeakRefs seem to be junk when I load. Hopefully > |the program below explains everything. I'm using Ruby 184-15 on Windows > |XP Pro. > | > |Am I missing something? > > No, it's a bug. Thank you for finding it. Note that restored weakref > object will weakly refer to a new (copied) object. It's only way to > make weakref valid between processes. > > matz. By "will" do you mean "should"? Because it looks to me at the moment as if there's no ref at all there. Or have I mis-understood? And does "newly copied object" mean that instead if I had two weak refs to an object in my original program, then after loading they'll refer to separate ones??? Thanks for the fast response - and btw: great language design!