From: "trans (Thomas Sawyer)" Date: 2012-12-06T00:36:30+09:00 Subject: [ruby-core:50580] [ruby-trunk - Feature #7519][Open] Module Single Inheritance Issue #7519 has been reported by trans (Thomas Sawyer). ---------------------------------------- Feature #7519: Module Single Inheritance https://bugs.ruby-lang.org/issues/7519 Author: trans (Thomas Sawyer) Status: Open Priority: Normal Assignee: Category: core Target version: Next Major A limitation of modules is that they can not gain and augment the qualities of another module in the same manner that a class can of another class. They can use #include, but using #include to carry the behavior of one module into another is limited in that singleton methods are not available to it and also because of the well known Module Include Problem. So it occurs to me that modules could have their own inheritance chain. For example: module M def self.foo "foo" end def bar "bar" end end module N < M def bar super + "!" end end N.foo #=> "foo" class C include N end C.new.bar #=> "bar!" I think it easy to think about in terms of classes being types of "nouns", and modules being types of "adjectives". So just as one "noun" can inherit the behavior of another "noun", so could one "adjective" inherit the behavior of another "adjective". -- http://bugs.ruby-lang.org/