From: Csaba Henk Date: 2005-04-08T23:54:42+09:00 Subject: Re: [EVALUATION] - E03b - The Ruby Object Model On 2005-04-05, Lionel Thiry wrote: > Most of the time, everything goes in ruby as if there weren't any kind of > metaclasses. For exemple, you cannot explicitely create your own metaclasses: > > class MyMetaClass < Class > end > > It raises the exception: > metaclass.rb:1: can't make subclass of Class (TypeError) Hmm, the rigor of the interpreter here is somewhat loose. You can subclass Class, just not as you tried. MyMetaClass = Class.new Class MyMetaClass.ancestors # => [MyMetaClass, Class, Module, Object, Kernel] This works just fine. However, it's not too consistent altogether... Csaba