From: "John J. Franey" Date: 2007-06-13T22:40:18+09:00 Subject: define_method to define a method to pass a block to another method I would like to define the following method, func, using define_method instead of def: def func(i, &block) wblock(i, &block) end def wblock(i, &block) yield(i) end The following didn't work: # syntax error define_method('func') do |i,&block| wblock(i, &block) end # ruby expects a second parameter, not a block define_method('func') do |i,block| wblock(i, &block) end Any ideas? Thanks -- View this message in context: http://www.nabble.com/define_method-to-define-a-method-to-pass-a-block-to-another-method-tf3914663.html#a11099403 Sent from the ruby-talk mailing list archive at Nabble.com.