"Philip Mateescu" <philip / dynasty.com> wrote in message news:<010e01c20b36$51276130$0a01a8c0 / DynRom.local>...
> Thank you Tobias and thank you Marko.
> 
> However, what if I would want to call another method of its ancestor ?
> Something along the lines of :
> class Boo
>     def say_what
>         puts "boo what?"
>     def
>     def say_who
>         puts "class Boo"
>     end
> end
> 
> class Foo < Boo
>     def say_what
>         # none of the following three work
>         super.say_who        # xor
>         super().say_who      # xor
>         super.send :say_who  #
> 
> 
> 
> I do have an extra question (TIA) : why does it (Foo.new.say_what) still
> prints "boo what?" in all three cases ?

super # <== looks for say_what in superclass

so, your example is calling the Boo.say_what, then trying to send a
say_who message to the returned value.  also, does do what you want?

class Foo < Boo
    alias say_what say_who
end

hope this was helpful, I'm a little bleary eyed right now.

night,

Patrick