From: Christoph Date: 2002-04-10T06:24:56+09:00 Subject: RE: Mixins vs. Multiple Inheritance > From: Paul Brannan ... > then there are a few important differences between C++ MI and Ruby > mix-ins: Note you can create a Ruby ``mixin-diamond'' with a C++ - ``(virtual) inheritance-diamond'' like method search order (see [ruby-talk:37486]) . > 1) Ruby simplifies this inheritance to look like: .... > 6) Mixing in a module in Ruby can actually cause code to be executed. > This doesn't happen with Ruby's inheritance (correct me if I'm ---- class A def self.inherited(sub_klass) puts "#{self} < #{sub_klass}" end end class B < A; end # => A < B ---- ... /Christoph