From: ts Date: 2003-06-03T21:48:03+09:00 Subject: Re: [1.8] alias >>>>> "Y" == Yukihiro Matsumoto writes: Y> No, I was too eager to resolve inheritance line problem. I will move Y> adjustment to rb_call_super(). Well, I like the DRY principle but certainly I don't really understand how alias work svg% cat b.rb #!./ruby -v module M def init(a) p "M #{a}" end end class A include M def init(a) p "A : #{a}" super 12 end end module N def init(a) p "N #{a}" super 12 end alias_method :abc, :init end class B < A include N def init(a) p "B#init" super end def abc(b) p "abc" super end end puts "=======================" b = B.new b.init(24) puts "=======================" b.abc(36) svg% svg% b.rb ruby 1.8.0 (2003-06-03) [i686-linux] ======================= "B#init" "N 24" "A : 12" "M 12" ======================= "abc" "N 36" ./b.rb:21:in `abc': super: no superclass method `abc' (NoMethodError) from ./b.rb:35:in `abc' from ./b.rb:43 svg% Guy Decoux