From: Brian Candler Date: 2010-09-06T23:11:42+09:00 Subject: Re: Odd functional programming question On Mon, Sep 06, 2010 at 10:50:35PM +0900, Peter Hickman wrote: > Any other ideas gratefully received. That's The Right Way To Do It. For methods which take a block you'll need to pass that through, and it's slightly more efficient to use symbols instead of strings (if you pass a string to send, it will have to convert it to a symbol for you). def X(text, todo, *args, &blk) text.send(todo, *args, &blk) end puts X("abcdefgh", :downcase) puts X("abcdefgh", :each_byte) { |i| puts i }