From: dblack@... Date: 2003-02-11T22:37:30+09:00 Subject: Re: Question about page 244 of the pickaxe... Hi -- On Tue, 11 Feb 2003, Chris Pine wrote: > Then we do something like `class << obj; end' and see how `obj' changes: > > obj > ----- > klass > | > | > V > > singleton +---> SomeClass +---> OtherClass > --------- | --------- | ---------- > super -----+ super -----+ > > > Again, all of the classes (including the singleton class) have their klass > pointer going to Class. > > The above model is correct (as far as I know) if we are talking about > non-class object, but incorrect if we are talking about classes. The > difference is in the singleton's super pointer. If it did work just like > with non-classes, then the super pointer of Guitar' (Guitar's singleton > class) would point to Class, which would be SomeClass in the above example. But the superclass of Guitar is Object, not Class. Guitar is an instance of Class, not a subclass of it. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav