On 6/15/07, John J. Franey <jjfraney / verizon.net> wrote:
> I think the answer to my question, then is: define_method cannot define a
> method that accepts a block passed implicitly or  using the '&'.

Correct.

In ruby 1.8, blocks can't accept a block.  This feature has been added in 1.9.

If you need to dynamically define methods which take blocks in 1.8, I
think you'll need to use #class_eval / #module_eval either with a
block with defs in it (less useful, since locals outside the block
aren't accesible inside the defs), or with a string argument (with the
usual caveats about evalling strings which might be generated from
user input).

George.