------ art_4541_24540257.1219763683611 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > I'm actually wrapping existing methods so I need to use define_method to > retain access to the old method. Here's my (broken) code so far: > > module Continuations > def accepts_continuation(*args) > args.each do |method_name| > func nstance_method(method_name) > define_method(method_name) do |*params, &block| > value unc.bind(self).call(*params) > end > end > end > end > To clarify, this formulation does not work: module Continuations def accepts_continuation(*args) args.each do |method_name| func nstance_method(method_name) module_eval <<-EOS def #{method_name}(*params, &block) value unc.bind(self).call(params) end EOS end end end ------ art_4541_24540257.1219763683611--