From: Gary Wright Date: 2008-02-15T08:43:21+09:00 Subject: Re: object specific methods and id On Feb 14, 2008, at 6:19 PM, 7stud -- wrote: > UpsNDowns wrote: >> If I create an object specifc method foo on my string instance obj, a >> new anonymous class (the singleton, I gather) is created and obj is >> considered an instance of that. >> >> Also, every thing is an object (event classes). So how come, >> obj.class.id >> and >> "someString".class.id >> is the same? >> >> They aren't: > > puts String.class > puts 'hello'.class The original poster was talking about a string instance that has been specialized with a singleton method, not the String class object. UpnsNDowns: You have to be careful about thinking of the object as an instance of its eigenclass. It is a useful analogy but it is just that, an analogy. Gary Wright