From: Gary Wright Date: 2006-03-15T06:41:56+09:00 Subject: Re: Alternate notation for eigenclass On Mar 14, 2006, at 10:44 AM, dblack@wobblini.net wrote: > I'm certainly a Kernel#s[ingleton_]class advocate, but I don't think > it's obvious that this change in the behavior of the class keyword > would follow, since: > > class some_class_in_a_variable > > doesn't work. I don't know the reasoning behind it. Yes. My comment regarding expressions after the 'class' keyword was a more general comment on the syntax/semantics of a class/end block than anything specific to singleton class notation. I just find the semantics/syntax of the 'class' keyword a bit strange. Here is another example: (class A; self; end) is not a valid expression in a method definition but: (class << obj; self; end) is just fine. And as I said earlier, Ruby is quite happy to have an expression as the superclass such as: class ProxyArray < DelgateClass(Array) end I would think that class expression #code end would be analogous to expression.class_eval { # code } Gary Wright