In Ruby, why does inspect() print out some kind of object id which is different from what object_id() gives?
When the p function is used to print out an object, it may give an ID, and it is different from what object_id() gives. What is the reason for the different numbers? Update: 0x4684abc is different from 36971870, which is 0x234255E >> a = Point.new => #<Point:0x4684abc> >> a.object_id => 36971870 >> a.__id__ => 36971870 >> "%X" % a....