From: Csaba Henk Date: 2004-06-11T19:58:40+09:00 Subject: Re: method with yield via send In article <200406100102.i5A12ooG027348@sharui.nakada.niregi.kanuma.tochigi.jp>, nobu.nokada@softhome.net wrote: > Mark Hubbart wrote in [ruby-talk:102995]: >> In Ruby 2.0, you will be able to do something like this: >> >> c = Class.new >> foop = lambda {|&b| b.call * 5 } >> c.send(:define_method, :foo, foop) > > It has been implemented in 1.9. > > Tue May 25 11:54:13 2004 Nobuyoshi Nakada > > * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a block > to a Proc. [ruby-dev:23533] > > * parse.y (block_par, block_var): ditto. That's cool, thanks! -- Csaba "There's more to life, than books, you know but not much more..." [The Smiths] *** If you want to send me a mail, see it in the mailto link at http://www.renyi.hu/~ekho/egyelore.html