From: Wybo Dekker Date: 2005-08-10T19:05:04+09:00 Subject: passing a method I want to make a method which can execute another method given to it as an argument. The following works but the call doesn't look elegant - is it the ruby way? wybo>cat test.rb #!/usr/bin/env ruby @t = '' def bye @t << 'bye' end def hello @t << 'hello' end def doit(f) f.call end doit(method(:hello)) doit(method(:bye)) doit(method(:hello)) puts @t wybo>ruby test.rb hellobyehello wybo> -- Wybo