Hi, At Wed, 10 Aug 2005 19:05:04 +0900, Wybo Dekker wrote in [ruby-talk:151467]: > 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? Another way: > #!/usr/bin/env ruby > @t = '' > def bye > @t << 'bye' > end > def hello > @t << 'hello' > end > def doit yield > end doit(&method(:hello)) doit(&method(:bye)) doit(&method(:hello)) puts @t -- Nobu Nakada