From: Dominik Honnef Date: 2010-04-24T22:22:48+09:00 Subject: Re: #object_hexid On [Sat, 24.04.2010 22:16], Intransition wrote: > Can anyone write a reliable Kernel#object_hexid, a method that returns > an object's id but in hex, just like Ruby's normal #inspect provides. > > My attempts seems to break depending on the version of Ruby used. > > "0x%x" % (object_id << 1) should work univerally, I guess.