From: Dave Thomas Date: 2000-11-29T23:59:06+09:00 Subject: [ruby-talk:6632] Re: Why is WeakRef#__getobj__ missing from the pickaxe book? cjon@sapphire.engin.umich.edu (Cullen J O'neill) writes: > My question is, isn't it a better idea to just get a real reference > to the object using __getobj__? There are two reasons I can think of, but neither is a show-stopper. 1. You're assuming an implementation, which might not be there forever. 2. You're taking a risk by regenerating the original object reference. The downside to using WeakRef the conventional way is a small overhead during method dispatch as it searches one level up the class chain. On balance, I'd probably just use it the conventional way. Dave