From: "David A. Black" Date: 2007-11-16T20:32:07+09:00 Subject: Re: meta-class subclass relationships Hi -- On Fri, 16 Nov 2007, Greg Weeks wrote: > PS: I just realized that my (erroneous) expectation > > $Meta_A.superclass == $Meta_B > $Meta_B.superclass == $Meta_Object > > is asserted in Figure 24.2 of the Pickaxe book (2nd edition). Eg, for > the second equality, just replace "Guitar" with "B". So why, I wonder, > isn't it true? It will be :-) It worked in 1.8.2, doesn't work in 1.8.6, works again in 1.9. I don't know what the rationale was for changing the model, but it's changed back. rubypal:~$ cat super.rb class Object def singleton_class class << self; self; end end end p String.singleton_class.superclass == Object.singleton_class rubypal:~$ /usr/local/lib/ruby-1.8.2/bin/ruby -v super.rb ruby 1.8.2 (2004-12-25) [i686-linux] true rubypal:~$ ruby -v super.rb ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] false rubypal:~$ /usr/local/lib/ruby-svn/bin/ruby -v super.rb ruby 1.9.0 (2007-11-07 patchlevel 0) [i686-linux] true David -- Upcoming training by David A. Black/Ruby Power and Light, LLC: * Advancing With Rails, Berlin, Germany, November 19-22 * Intro to Rails, London, UK, December 3-6 (by Skills Matter) See http://www.rubypal.com for details!