On Tue, 1 Aug 2000, Yukihiro Matsumoto wrote: > Hi, > Hi and thanks for your reply, > You have to invoke call_finalizer(obj) to arrange finalizer to be > called upon which object (I know it's a bad name). In addition, > _id2ref(id) may not work, since finalizers are executed AFTER object > destruction. > LibRef Change proposal to Dave and/or Andy: IMHO, the example in the Lib reference on ObjectSpace.call_finalizer is somewhat misleading: -------- ObjectSpace.add_finalizer Proc.new {|id| print "Good bye ", id, "=", ObjectSpace._id2ref(id), "\n" } a = "String one" b = "String two" ObjectSpace.call_finalizer(a) ObjectSpace.call_finalizer(b) print "We exit now...\n" -------- since _id2ref may not work and the example does not produce the result you'd expect. ("We exit now..." but not the two "Good bye..." strings...) Regards, Robert