On Aug 26, 2006, at 7:38 PM, Alexandre Hudelot wrote:

> Hello, how does one set a pointer to foo using an id string obtained
> through foo.object_id for instance?
>
> Thanks in advance
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

---------------------------------------------------- ObjectSpace#_id2ref
      ObjectSpace._id2ref(object_id) -> an_object
------------------------------------------------------------------------
      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


Cheers-
-Ezra