From: Vincent Fourmond Date: 2006-11-17T01:51:56+09:00 Subject: Re: Accessing base method... Soso Soso wrote: > Hi all, > > I'm new to ruby, being trying to access base class method but with no > luck until now. Here's a snippet to get an idea: > > > class Parent > def knox > puts 'parent' > end > end > > class Child < Parent > def knox > puts 'child' > end > def test > knox # here I want to call knox method from Parent class... ?? > end > end I think this is not possible: when you redefine knox in the child, all calls to knox go to the child method. However, you can use the parent's knox from whitin the child knox with super. Vince -- Vincent Fourmond, PhD student http://vincent.fourmond.neuf.fr/