From: Jan Svitok Date: 2006-08-24T01:50:09+09:00 Subject: Re: Call functions of superclass On 8/23/06, Douglas A. Seifert wrote: > Why would you need to explicitly reference super? It is not necessary: > > $ irb > irb(main):001:0> class Parent > irb(main):002:1> def zoo > irb(main):003:2> puts "zoo in Parent!" > irb(main):004:2> end > irb(main):005:1> end > => nil > irb(main):006:0> > irb(main):007:0* class Child < Parent > irb(main):008:1> def hoo > irb(main):009:2> zoo > irb(main):010:2> end > irb(main):011:1> end The OP defined method zoo in Child as well, and wanted to call the Parent's zoo, that's why. > If there is some common functionality that needs to be accessed by two > methods, one defined in the child class, the other defined in the parent > class, I'd say refactor it out into a method in the Parent class and > call it from wherever it is needed: This seems to be a reasonable approach. I agree that a bit refactoring is much better than hacking with cross calling methods. OTOH, I am also curious whether it is possible. J.