From: James Coglan Date: 2008-08-26T23:30:21+09:00 Subject: Passing a block with define_method ------=_Part_4120_14135265.1219761287466 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I've got a bit of a problem whereby I need to pass a block to a method defined using define_method this works: def some_method(*args, &block) # ... end but this does not -- the interpreter complains about unexpected ampersands: define_method(:some_method) do |*args, &block| # ... end Is there any way to make this work? I'm doing something a little meta, so I don't know the name of the method or the number of arguments, so it's all got to be dynamic. -- James Coglan ------=_Part_4120_14135265.1219761287466--