From: Robert Klemme Date: 2009-03-08T22:28:23+09:00 Subject: Re: Can I access or find a object from it's instance variable? On 08.03.2009 05:57, Aki Wakabayashi wrote: > What I really wanted was to get the actual identifier of the object, but What exactly do you mean by "actual identifier"? If you mean #object_id then there is method ObjectSpace._id2ref. http://www.ruby-doc.org/core/classes/ObjectSpace.html#M006793 > for now I'll create a instance variable for the actual identifier so I > can put it in the to_s method, and I can get things working. If you mean the object id then you do not need an instance variable to put it into to_s's output. > I know it's not the Rubyist way, but I just started, so hopefully I can > find a better way later and post it here. The question is: what are you trying to achieve? Kind regards robert