From: luke gruber Date: 2011-08-23T05:08:14+09:00 Subject: Re: Gritty Details of super() >The superclass relation only ever includes classes and it is fixed at >class creation time (by stating "class X < Y" or "Class.new Y") but the >inheritance relation includes classes and modules and is modified whenever >a module is included somewhere in the class hierarchy. Only the >inheritance relation is considered for method lookups. >Robert That's a great way of putting it Robert. Thanks for that. Another, sort of related thing: Speaking of method lookup, class objects that have singleton classes embedded in singleton classes look up methods in the superclass's singleton class's singleton class (if it exists) and actually stop at the top-most singleton class of the original class object. A mouthful... I find this really cool if not pretty useless :) And like if a class object has 10 singleton classes with a greet() method defined in the seventh and eighth, and the subclass calls greet() in its sixth singleton class, it won't resolve. Umm... I Just read that over and wet myself. Illustrative code snippet: https://gist.github.com/1163364 Thanks all -Luke -- Posted via http://www.ruby-forum.com/.