From: Sandro Paganotti Date: 2008-05-06T20:42:48+09:00 Subject: Re: Hot to call to any parent class method? I've found this way... class ClassA def method1 puts "From classA" end end class ClassB < ClassA def method1 puts "From classB" end def method2 self.class.superclass.instance_method(:method1).bind(self).call end end ClassB.new.method2 On Tue, May 6, 2008 at 9:46 AM, Iņaki Baz Castillo wrote: > Hi, I've modified "delete" class in MyArray class but in other custom > method I need to call to iriginal "delete" method. > Well I know that I can do: > > alias original_delete delete > > def delete(v) > ...my_stuff... > end > > def other_method > ... > original_delete ... > end > > end > > > But, could I do the same without using an alias? could I call directly > to a parent (Array) method from any mehtod of the "soon" class? > > -- > Iņaki Baz Castillo > > -- Go outside! The graphics are amazing!