From: Robert Dober Date: 2007-08-05T02:53:28+09:00 Subject: Re: method_added hook and class methods On 8/4/07, Pit Capitain wrote: > 2007/8/4, Keith Rarick : > > Out of curiosity, why are metaclasses treated differently than regular > > classes in this respect? > > Keith, I've been asking this time and again since a couple of years > ago. I think the reason is that Matz didn't want singleton classes to > be part of the Ruby language (yet). A more recent thread about a Singleton class not being in ancestors seems to confirm your theory. Matz explicitly added a check for singleton classes not to be in ancestor, he was kind of violating smooth flow. I was sure that he had a hidden agenda in order to do such things, it might be what you said below. I nevertheless share the feelings of some others that it is a shame! Of course if Matz were right I'd love to see the concept and I'd love to see singleton classes go away, but I feel it is impossible :(. >He always said it would be > possible to implement singleton methods without having singleton > classes. I got the impression that he might be changing his mind for > future versions of Ruby, though, but I'm not sure. Matz, if you read > this, are there some new insights concerning this topic? +222 here > > Regards, > Pit > > Cheers Robert -- [...] as simple as possible, but no simpler. -- Attributed to Albert Einstein