From: Gary Wright Date: 2007-04-07T04:45:01+09:00 Subject: Re: Everything is a object? On Apr 6, 2007, at 2:56 PM, Jamal Soueidan wrote: > Gary Wright wrote: >> On Apr 6, 2007, at 9:24 AM, Jamal Soueidan wrote: >> >>> Two different objects, even if they were the same. >> Do you have a typo there? Do you want: >> >> p @one.object_id >> p @two.object_id >> > > I thought that if both @instance don't have the same object_id they > would two different objects...but that is not true? That is true. All objects have unique object ids. If the objects referenced by two variables have the same object id then you've got two references to the same object. In your original post you had: > @one = A.new > @two = A.new > > p @one.object_id > p @one_object_id # TYPO??? > # 21103660 > # 21103640 Which just doesn't make sense. Specifically, @one_object_id isn't defined in your example (note the underscore instead of dot) and should have evaluated to nil. Since you illustrated two different object_id's, I assumed you had simply made some sort of cut and paste error and you had intended to show @two.object_id and not @one_object_id.