From: Gavin Sinclair Date: 2002-10-13T19:29:15+09:00 Subject: Re: Things That Newcomers to Ruby Should Know ----- Original Message ----- From: "Brian Candler" > > > > When I discovered this some time ago, I wondered deeply what might be occupying > > id #s 2, 4, 6, ... > > Other objects. A few predefined ones: > > irb(main):001:0> false.id > 0 > irb(main):002:0> true.id > 2 > irb(main):003:0> nil.id > 4 > > and others dynamically allocated, where the id is (I presume) a pointer to > the data structure. I haven't looked at the source, but I posted a guessed > explanation of why fixnums have odd ids at ruby-talk:53040. All my objects seem to start somewhere around 13000000! It was interesting, but I don't see how the ID of an object can be a pointer, in the traditional sense. I imagine a lookup table. I'm interested in this, and this might give me my first reason to examine the source code. > > Brian. Gavin