From: Robert Dober Date: 2009-05-08T03:27:56+09:00 Subject: Re: Superclass of eigenclass On Thu, May 7, 2009 at 7:17 PM, Danny O cuiv wrote: > Hi Rick, > > I suspect that you're right that the text is incorrect. I doubt that > it's a typo (in the sense of something that was fat-fingered) as the > three sentences, taken together, are consistent in what they express. As > such, it seems mistaken, which makes me curious to know what they were > intending to say. > > Your investigation of the issue corresponds with mine. I would, however, > take issue with an aspect of your revised wording, specifically the > following: > >> The eigenclass of an ordinary object can have neither a subclass, >> nor any other instance except that single ordinary object. > > The ordinary object is not an instance of the eigenclass. In your > example, the ordinary object is an instance of TestClass, not of any > eigenclass. Indeed, there would be a bootstrapping problem if you > regarded the ordinary object as an instance of the eigenclass. (You can > only have an eigenclass in the context of an existing object, so you > couldn't have created that object in the first place by instantiating > the eigenclass.) I did not read that Rick said anything about instantiating, but for what I am concerned he sure is right because of this: irb(main):006:0> a=Object::new => # irb(main):007:0> s=class << a; self end => #> irb(main):008:0> a.is_a? s => true irb(main):009:0> s::new TypeError: can't create instance of singleton class from (irb):9:in `new' from (irb):9 from /usr/local/bin/irb:12:in `
' Cheers R.