From: "David A. Black" Date: 2007-11-17T04:51:44+09:00 Subject: Re: meta-class subclass relationships Hi -- On Sat, 17 Nov 2007, Greg Weeks wrote: > *Many* thanks for the info. I was going to swallow the 1.8.6 behavior, > but I much prefer the Figure 24.2 behavior. > > On the other hand, it is not true that A.class == $Meta_A. For the > "class" message, the rule seems to be that you follow the inheritance > chain until you find a non-virtual class. This would be a reasonable > behavior for the "superclass" message too, I think. (Preferable, > perhaps.) > > As for "Meta": I don't know if the English language is precise on this > point. As I understand it, a meta-foo is a foo *about* foos. A > meta-class is a class with class instances, I would think. Although > most Ruby meta-classes are virtual, we can still mix modules into them, > so they provide a powerful mechanism for meta-programming. That's why > I'm inclined to call them (limited) meta-classes. I believe Jim Weirich once said that the only real metaclass in Ruby is Class, since it's the source of class instances. 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!