From: Philip Mateescu Date: 2002-06-05T07:40:19+09:00 Subject: Re: Calling a (any) superclass method when already have one by that name Wrong ? Nothing, I just wanted another way... From a personal point of view, aliasing, while I see it's a great technique, it somehow seem to me it dimishes the dynamicality of code. I mean you have to alias all the methods you wanna use from the superclass (and which are overridden in the current class)... thanks a lot, philip ----- Original Message ----- From: "Ned Konz" To: "ruby-talk ML" Sent: Wednesday, 05 June, 2002 12:59 AM Subject: Re: Calling a (any) superclass method when already have one by that name On Tuesday 04 June 2002 02:37 pm, Philip Mateescu wrote: > So, how do I call a method of my superclass when I have a method > with the same name in my current class (i.e. is there any other way > beside aliasing) ? What's wrong with aliasing? class A def foo puts "A::foo" end end class B < A alias :aFoo :foo # refer to A::foo def foo puts "B::foo" aFoo end end -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE