From: Arlen Christian Mart Cuss Date: 2007-09-27T01:09:09+09:00 Subject: Re: object_id 1, 2, 3 > One should keep in mind that these are interesting implementation > artifacts. I don't believe that there's any guarantee that such ids > would be the same in an arbitrary ruby implementation or even between > versions of the same implementation. > No -- nor should they be expected to be, under any circumstance. At best, they're used for comparing objects (Object#==), and should never be explicitly stored or used for comparisons or hash lookups *in their own right*. Even two similar strings can have different object_ids. irb(main):001:0> "a".object_id => 23739988544880 irb(main):002:0> "a".object_id => 23739988519760 irb(main):003:0> Be careful, and remember that you should anticipate them to never remain constant between executions of even the same interpreter. (though they will for your numbers, but beware.. :)) Arlen