From: Emmanuel Oga Date: 2008-08-27T00:18:35+09:00 Subject: Re: Passing a block with define_method > To clarify, this formulation does not work: > > module Continuations > def accepts_continuation(*args) > args.each do |method_name| > func = instance_method(method_name) > module_eval <<-EOS > def #{method_name}(*params, &block) > value = func.bind(self).call(params) where does the "func" method come from here? because you are using module_eval, this is just calling a method named "func" on the target class (the class where you included the module). I don't think this would do what you want, even if you do have a "func" method lying around... > end > EOS > end > end > end -- Posted via http://www.ruby-forum.com/.