Cullen J O'Neill proposed: > 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__ I don't know much about weak references, but I'd guess you risk losing the real object with above code. I feel I would not rely on the fact there happens no GC between alive? and __getobj__. Nevertheless I guess some combination of your's and book's versions would be ideal, while pretty wordy. I don't like the idea GC is disabled, at least for longer periods. Maybe there's demand for weakref.if_alive do |ref| # stuff end And hide the ugly semantics of GC disabling, and allow immediate GC enabling. - Aleksi