umptious
12/7/2006 1:40:00 AM
Logan Capaldo wrote:
> On Thu, Dec 07, 2006 at 08:55:10AM +0900, umptious@gmail.com wrote:
> > 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?
> >
> WeakRefs should be junk when you load, if they're allowed to be
> Marshaled at all. A WeakRef is a reference that's not tracked by GC,
> unless by a very strange odd coincidence no weakref from one invocation
> of a program should be valid in another.
If this is correct, it's still a bug until it is VERY clearly
documented..