From: Marnen Laibow-Koser Date: 2009-12-30T21:11:40+09:00 Subject: Re: How to pass a function as parameter? Fritz Trapper wrote: > Thanks for your quick replies. > > I see, my scenario is somewhat more complicated, than I wrote in my > initial posting. The point is, that I want to pass an object and a > method. > > Something like this: > > def executer(obj, method) > f.method(1) > end > > class x > def test(x) > p x > end > end > > o = x.new > executer(o, test) Why not just use o.send(:test) ? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.