Ruben Vandeginste
12/1/2004 3:14:00 PM
At Wed, 1 Dec 2004 23:48:48 +0900,
trans. (T. Onoma) wrote:
>
> Can anyone help me understand why these are not the same, and how to fix?
>
> class Object
> def object_hexid
> return "0x#{'%x'%(self.__id__)}"
> end
> end
>
> o.inspect
> => "#<Object:0x40335764>"
>
> o.object_hexid
> => "0x2019abb2"
>
> Thanks,
> T.
Did you notice that (0x40335764 >> 1) == 0x2019abb2 ?
Ruben