From: Jim Weirich Date: 2005-04-21T06:32:15+09:00 Subject: Question on Singleton Classes (was: Seeing Metaclasses Clearly) David A. Black said: > On the other hand (also from the point of view of a chronic > explainer of Ruby :-) it's easier to say: Every object has a birth > class and a singleton [or whatever] class, than: Every object has a > class and a (class << self; self; end) :-) A question for those familiar with Ruby internals ... does an object's singleton class exist from the moment the object is created, or does it spring into existence the moment it is needed to hold singleton methods? -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)