On Nov 16, 2007 5:27 PM, Greg Weeks <greg.weeks / arm.com> wrote: > >> True if "real" means "non-virtual", as it so often does. But that > >> leaves > >> virtual metaclasses, at the heart of Ruby metaprogramming. > > > > I'm not sure in what sense they're virtual (though I know that > > terminology occurs in some error messages). Once they're created, they > > exist as first-class objects. > > Right. But they can't be instantiated, Well, actually they each have one instance, which is created at the same time they are (or vice-versa). This is the sense that they are 'singletons'. And I can think of at least three other classes which have single instances and can't be 'further' instantiated, although I've never heard NilClass, TrueClass, and FalseClass referred to as singleton classes. > and they are specially handled > by various reflection methods (eg, #class completely ignores them). And superclass seems unsure about them from release to release. >The > term "virtual" didn't appeal to me much either, but Pickaxe and the > error messages both use it. Right, as far as I can see it only comes up in the error messages when you try to subclass a class which has the FL_SINGLETON flag bit set. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/