From: Rick DeNatale Date: 2007-06-24T05:14:57+09:00 Subject: Re: Error in ancestor? On 6/22/07, Gregory Brown wrote: > On 6/22/07, dblack@wobblini.net wrote: > > > It's interesting, though, that Matz's reason for not adding K#s_c is, > > I think, concern about the name of the singleton class (as opposed to > > wanting it to be obscure). Hopefully that will be clarified in 2.0. > > Well at this point is anyone still vehemently opposed to singleton_class ? > > Meta class seems to be falling out of fashion and Eigenclass (sadly) > never had widespread acceptance. The problem with metaclass is that it's just one of the two(?) uses of singleton class, a metaclass is the class of a class, which in ruby happens to be implemented by a singleton class. I'd suggest defining Kernel#singleton_class, AND defining Module#metaclass as an alias which applies to Modules and classes. I THINK that it makes sense to think of the (singleton) class of a Module to be a metaclass. Were this done, another question arises as to whether e,g, Array.class should still return Class instead of #. To me this seems different than the case of hiding a singleton class of an object which is not a Module/Class. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/