From: matz@... (Yukihiro Matsumoto) Date: 2003-04-24T17:28:00+09:00 Subject: Re: [ANN] Ruby.shop Hi, In message "Re: [ANN] Ruby.shop" on 03/04/24, Mauricio Fern�ndez writes: | /* | * Ruby's Class Hierarchy Chart | * | * +------------------+ | * | | | * Object---->(Object) | | * ^ ^ ^ ^ | | * | | | | | | * | | +-----+ +---------+ | | * | | | | | | * | +-----------+ | | | * | | | | | | * +------+ | Module--->(Module) | | * | | ^ ^ | | * OtherClass-->(OtherClass) | | | | * | | | | * Class---->(Class) | | * ^ | | * | | | * +----------------+ | * | * + All metaclasses are instances of the class `Class'. | */ | |Note that if I read this right Object doesn't inherit Class but |extends it, as if we had | Object.extend Class |which of course doesn't work since Class.class != Module. | |I thus believe the loop at the top of the poster is just wrong. The vertical relationships (e.g. one between Module and Object) are class-superclass relations. Class's superclass is Module; Module's superclass is Object. The horizontal relationships are class-metaclass relations. Class has its unnamed singleton class (metaclass), and its superclass is a metaclass for Module, and so forth. I hope this explains the figure. I believe it's not wrong. matz.