From: Yohanes Santoso Date: 2002-06-20T14:29:31+09:00 Subject: Re: can super call a method multiple classes higher in the hierarchy? Ian Macdonald writes: > Hi, > > Am I right in thinking that if I call super from method foo in class > Bar, it does not matter that no identically named method is defined in > Bar's parent class, just as long as an identically named method _is_ > defined in the grandparent or an even further removed ancestor class > of Bar? That's what inheritance in OOP does. irb(main):001:0> class A irb(main):002:1> def hallo irb(main):003:2> puts "HALLO FROM A" irb(main):004:2> end irb(main):005:1> end nil irb(main):006:0> class B < A irb(main):007:1> end nil irb(main):008:0> class C < B irb(main):009:1> def hallo irb(main):010:2> super irb(main):011:2> puts "HALLO FROM C" irb(main):012:2> end irb(main):013:1> end nil irb(main):014:0> C.new.hallo HALLO FROM A HALLO FROM C nil YS.