From: cjon@... (Cullen J O'neill) Date: 2000-11-29T23:40:02+09:00 Subject: [ruby-talk:6628] Why is WeakRef#__getobj__ missing from the pickaxe book? I notice that the discussion of WeakRef from the pickaxe book has this example: ---- gcWasDisabled = GC.disable if ref.weakref_alive? # do stuff end GC.enable unless gcWasDisabled ---- My question is, isn't it a better idea to just get a real reference to the object using __getobj__? ---- if ref.weakref_alive? real_ref = ref.__getobj__ # do stuff real_ref = nil end ---- Cullen J O'Neill -- cjon@engin.umich.edu