From: Rick DeNatale Date: 2007-03-23T00:38:59+09:00 Subject: Re: [ ruby-Bugs-9462 ] BUGS in metaclasses inheritance On 3/22/07, Charles Thornton wrote: > This chart is essentially correct, It simply leaves out a few > implementation > details. > > (1) "Object" super entry includes the ObjectSpace Module Where did that come from? Object includes Kernel, not ObjectSpace. So that rb_cObject's superclass chain should look like: rb_cObject --> (T_Iclass:Kernel) ---> nil where T_ICLASS:Kernel has: klass = rb_cClass iv_tbl = rb_mKernel.iv_tbl m_tbl = rb_mKernel.iv_tbl Note also that Object.superclass doesn't always return the value of the klass field. It walks the superclass chain and skips past classes marked at T_ICLASS which are proxies for included modules. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/