method

_id2ref

v1_8_7_72 - Show latest stable - Class: ObjectSpace
_id2ref(p1)
public

Converts an object id to a reference to the object. May not be called on an object id passed as a parameter to a finalizer.

   s = "I am a string"                    #=> "I am a string"
   r = ObjectSpace._id2ref(s.object_id)   #=> "I am a string"
   r == s                                 #=> true