From: Calvin Bornhofen Date: 2013-04-12T10:29:17+09:00 Subject: Re: confusion with Struct class Hello, the method is defined as x.greeting, which makes self in it reference the object x - which is the class itself. And since the call to name is with an implicit receiver, self is used. So the call to name is sent to the class object, which returns the class' name (through constant magic the class' name is set to "Customer"). Class.new.class.name is similar in that we get the class of the new object and call it's name method. However, Class.class.name would not give the same result since we'd get the class of the class object, which name is "Class" (because all classes are instances of the class Class). Hope I could help. Regards, Calvin On 11.04.2013 23:08, Sigurd wrote: > Correct me if i'm wrong, but since when ruby 1.9 uses "name" for class name? I always though that it's Class.new.class.name or Class.class.name that gives proper result.