ruby-changes:22064
From: ktsj <ko1@a...>
Date: Sat, 24 Dec 2011 01:23:24 +0900 (JST)
Subject: [ruby-changes:22064] ktsj:r34113 (trunk): * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
ktsj 2011-12-24 01:23:13 +0900 (Sat, 24 Dec 2011) New Revision: 34113 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34113 Log: * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed just before calling rb_call0. * bootstraptest/test_flow.rb: add a test for above. Modified files: trunk/ChangeLog trunk/bootstraptest/test_flow.rb trunk/vm_eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34112) +++ ChangeLog (revision 34113) @@ -1,3 +1,10 @@ +Sat Dec 24 01:20:39 2011 Kazuki Tsujimoto <kazuki@c...> + + * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed + just before calling rb_call0. + + * bootstraptest/test_flow.rb: add a test for above. + Sat Dec 24 00:55:16 2011 Tanaka Akira <akr@f...> * lib/tempfile.rb (Tempfile#initialize): warn if a block is given. Index: bootstraptest/test_flow.rb =================================================================== --- bootstraptest/test_flow.rb (revision 34112) +++ bootstraptest/test_flow.rb (revision 34113) @@ -549,3 +549,16 @@ assert_equal "false", src + %q{e.all? {false}}, bug assert_equal "true", src + %q{e.include?(:foo)}, bug end +assert_equal %q{ok}, %q{ + $x = :ok + o = Object.new + def o.inspect(*args) + yield if block_given? + super + end + begin + nil.public_send(o) {$x = :ng} + rescue + end + $x +} Index: vm_eval.c =================================================================== --- vm_eval.c (revision 34112) +++ vm_eval.c (revision 34113) @@ -712,7 +712,6 @@ } vid = *argv++; argc--; - PASS_PASSED_BLOCK_TH(th); id = rb_check_id(&vid); if (!id) { @@ -723,6 +722,7 @@ } id = rb_to_id(vid); } + PASS_PASSED_BLOCK_TH(th); return rb_call0(recv, id, argc, argv, scope, self); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/