----- Original Message -----
> 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.
---------------------------

Look at the picture I drew again.  obj is Guitar.  The superclass of Guitar
is irrelevant, because in general obj need not have a superclass.  Meaning:
you can have a singleton class of any object, not just classes.

Assuming that obj.singleton_class returns the object's singleton class:

  'hello'.class -----------------------> String
  'hello'.singleton_class.superclass --> String

So I was tempted to say x.class == x.singleton_class.superclass for all x.
But the singleton mechanism is quite different for classes:

  Guitar.class -----------------------> Class
  Guitar.singleton_class.superclass --> Object.singleton_class

You seem to be suggesting that these are somehow doing the same thing.  (Am
I misunderstanding you?)  It seems pretty clear that Ruby is handling
singleton classes of classes differently from singlton classes of other
objects.  (I speculated that this was to allow inheritance of class
methods.)

Chris