From: Dave Thomas Date: 2003-12-08T22:48:48+09:00 Subject: Re: subclassing Errno::XXX On Dec 8, 2003, at 2:47, Yukihiro Matsumoto wrote: > I'm not sure what you mean. Do you mean when MissingFileError > inherits from Errno::ENOENT, it should inherit Errno constat from > Errno::ENOENT as well? I'm not addressing Nobu's point, but there is an argument to say that there is no meaningful inheritance at all if you _change_ Errno: that is, if you subclass an Errno::Xxx, the Errno constant in the subclass must be identical to that in the parent (otherwise it isn't a true subclass). After all, these classes are essentially wrappers for the Errno value, and so for a subclass to maintain the "isa" relationship it must wrap the same value too. Cheers Dave