From: "Eric I." Date: 2008-08-11T13:07:51+09:00 Subject: Re: Basic question about Ruby's class hierarchy On Aug 10, 11:22 pm, Patrick Li wrote: > I thought I understood this, but apparently not. > > What is this object exactly? > o = class << String; self; end > > From my understanding: > p o > and > p String > should output the same thing. > > but it doesn't > p o # > p String #String o is not the same as String. o is String's metaclass. The exact role that metaclasses play is Ruby's take on object-oriented programming is too much for an answer post such as this. But you might want to read why's explanation at: http://www.whytheluckystiff.net/articles/seeingMetaclassesClearly.html Eric ==== Rails training and Ruby training available at http://LearnRuby.com . On-site and customized training are available.