From: James Coglan Date: 2008-09-17T16:25:26+09:00 Subject: Re: SuperClass and Modules ------=_Part_1536_24626928.1221636769024 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > Multiple inheritance has one big problem usually denominated as "the > diamond problem". Check this link: > http://en.wikipedia.org/wiki/Diamond_problem. > Ruby using single inheritance plus mixins gives almost the same > advantages without these problems. You cannot have multiple inheritance without the diamond problem -- that page actually mentions how Ruby resolves method names in this case: module A; end module B; include A; end module C; include A; end class D include B include C end Methods will be looked up in D, C, B and A (in that order) when you call a method on an instance of D. -- James Coglan http://blog.jcoglan.com http://github.com/jcoglan ------=_Part_1536_24626928.1221636769024--