On Sun, Oct 25, 2009 at 5:02 PM, Yukihiro Matsumoto <matz / ruby-lang.org> wrote: > Originally, _id2ref is an implementation dependent hack for weakref, > so that you can remove it, if you can provide the better way. I suspected as much, since that seemed to be the primary place for it to be used. I guess the remaining question is about the uniqueness of object_id. I believe on Sun's JVMs java.lang.System.identityHashcode of an object will be unique for the lifetime of the object, but not unique forever (which I'm sure is the case on MRI). However, I don't think there's any guarantee that the identityHashCode will be unique across JVMs, though the documentation says an implementation should make a "best effort" to keep it unique. We will look at removing _id2ref in 1.5 (or making it do nothing, with a warning) as well as modifying the one stdlib that uses it (DRb, for reasons I have not yet explored). And I will explore whether identityHashcode will be "unique enough" as I suspect it should be. - Charlie