From: KDr2 Date: 2009-05-20T18:22:46+09:00 Subject: Re: Super super ? --000e0cd32d18f07e5f046a549114 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit class Object def super!(n,*args) method=caller[0][%r/.*?`(.*?)'/,1].to_sym klass=self.class.ancestors[n] klass.instance_method(method).bind(self).call(*args) end end class Grand_father def say_hello puts "Grand Father : Hello" end end class Father < Grand_father def say_hello super puts "Father : Hello" end end class Son < Father def say_hello super! 2 puts "Son : Hello" end end s = Son.new s.say_hello On Wed, May 20, 2009 at 3:29 AM, Marc-antoine Kruzik wrote: > s = Son.new > s.say_hello > -- Best Regards, -- KDr2, at x-macro.com. --000e0cd32d18f07e5f046a549114--