From: Vincent Isambart Date: 2004-08-10T01:07:38+09:00 Subject: Re: stupid question: Object#name About the class name, the name of the class is not necessarily the name of the constant that references the name. Example: class Foo end Bar = Foo Foo = 0 Then you cannot do Foo.new, but Bar.name returns "Foo". I think in fact, when the class does not exist, Ruby creates the class, and gives it the name that is after "class". It then gives to a constant of the same name the value of the class. If you try to add a method to Foo, it does not work : class Foo def a() end end -> TypeError: Foo is not a class You can still add a method to the class created before : class Bar def a() end end and Bar.field still returns "Foo". So the name field of class is just a name that does not necessarily means anything. I hope what I said was understandable ^o^ Regards, Vincent Isambart