From: ts Date: 2001-11-20T20:18:37+09:00 Subject: [ruby-talk:25905] Re: A bug invoking a method with send? >>>>> "Y" == Yukihiro Matsumoto writes: Y> |the following snippet demonstrates a bug (?) in the Y> |current cvs ... Y> It works fine on my box. Could you give me additional information Y> like: This is this call that it don't like @enum.send (@sym, &self) A missing "arg ',' block_arg" in call_args2 ? pigeon% diff -u parse.y.old parse.y --- parse.y.old Tue Nov 20 12:09:07 2001 +++ parse.y Tue Nov 20 12:09:22 2001 @@ -1104,6 +1104,10 @@ { $$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4); } + | arg ',' block_arg + { + $$ = arg_blk_pass($1, $3); + } | arg ',' tSTAR arg opt_block_arg { value_expr($1); pigeon% pigeon% cat b.rb #!./ruby class G < Proc def initialize(enum,sym = :each) super() @enum = enum @sym = sym end def run # the next line works in 1.6.5-cygwin but not in cvs @enum.send (@sym, &self) end end a = nil t = G.new (1..4) {|b| print a*b } a = -1 t.run # => -1-2-3-4 pigeon% b.rb -1-2-3-4pigeon% pigeon% Guy Decoux