On Sun, Dec 5, 2010 at 4:54 PM, Rick DeNatale <rick.denatale / gmail.com> wrote: > There's a much simpler explanation IMHO. ... Thanks for the detailed explanation. > The 'things' pointed to by klass pointers are either: Could this be a typo where you intended to say 'super' pointers? > 1) class objects (like Array, Hash, Object etc) if they are marked by > a flag that they are 'virtual' then they are not returned by methods > like class, superclass, ancestors, etc. From my findings: * the ancestors and the class method always hide it (as you write above) * the 'superclass' method _does_ return the first singleton classes pointed to by 'super' <code> $ irb ruby-1.9.2-head > class A < Object; end => nil ruby-1.9.2-head > A.singleton_class => #<Class:A> ruby-1.9.2-head > A.singleton_class.superclass => #<Class:Object> </code> > I suppose I should really turn this into a blog article. Those 2 posts are also relevant: * http://www.klankboomklang.com/2007/10/05/the-metaclass/ * http://www.hokstad.com/ruby-object-model.html Thanks again (I think I get it now, next step is to look it up in the C code) Peter