From: Ilias Lazaridis Date: 2005-04-19T19:09:42+09:00 Subject: Re: - E03c - The Ruby Object Model (Revised Documentation) mark sparshatt wrote: > Ilias Lazaridis wrote: > >> Martin DeMello wrote: >> >>> Ilias Lazaridis wrote: >>> >>>> In context of an Language Object Model: >>>> >>>> Object inherits from "nil". >>> >>> Object does *not* inherit from nil. Object.superclass returns 'nil' >>> because Object has no superclass. >> >> I've not said that "Object inherits from Class nil". >> >> I've said: Object inherits from nil >> >> which is true. >> > Surely if Object inherits from nil then Object should inherit all of > nil's methods > > nil.methods - Object.methods #=> ["&", "|", "^", "to_i", "to_s"] > > Object.to_s #=> NoMethodError: undefined method 'to_s' for Object:Class > > Since Object doesn't inherit all of nil's methods I don't see how it can > make sense to say that Object inherits from nil. see my reply to Mr. Matsumoto: "class Object inherits from nothing (represented by object nil)" new diagramm: http://lazaridis.com/case/lang/ruby/ > -- > Mark Sparshatt .. -- http://lazaridis.com