ruby-changes:50553
From: nagachika <ko1@a...>
Date: Thu, 8 Mar 2018 00:10:52 +0900 (JST)
Subject: [ruby-changes:50553] nagachika:r62694 (ruby_2_4): merge revision(s) 60437: [Backport #14057]
nagachika 2018-03-08 00:10:47 +0900 (Thu, 08 Mar 2018) New Revision: 62694 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62694 Log: merge revision(s) 60437: [Backport #14057] TracePoint#enable, #disable: Don't yield any argument. [Bug #14057] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/test/ruby/test_settracefunc.rb branches/ruby_2_4/version.h branches/ruby_2_4/vm_trace.c Index: ruby_2_4/test/ruby/test_settracefunc.rb =================================================================== --- ruby_2_4/test/ruby/test_settracefunc.rb (revision 62693) +++ ruby_2_4/test/ruby/test_settracefunc.rb (revision 62694) @@ -639,16 +639,19 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_settracefunc.rb#L639 def test_tracepoint_enable ary = [] + args = nil trace = TracePoint.new(:call){|tp| next if !target_thread? ary << tp.method_id } foo - trace.enable{ + trace.enable{|*a| + args = a foo } foo assert_equal([:foo], ary) + assert_equal([], args) trace = TracePoint.new{} begin @@ -663,17 +666,20 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_settracefunc.rb#L666 def test_tracepoint_disable ary = [] + args = nil trace = TracePoint.trace(:call){|tp| next if !target_thread? ary << tp.method_id } foo - trace.disable{ + trace.disable{|*a| + args = a foo } foo trace.disable assert_equal([:foo, :foo], ary) + assert_equal([], args) trace = TracePoint.new{} trace.enable{ Index: ruby_2_4/vm_trace.c =================================================================== --- ruby_2_4/vm_trace.c (revision 62693) +++ ruby_2_4/vm_trace.c (revision 62694) @@ -1103,7 +1103,7 @@ tracepoint_enable_m(VALUE tpval) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_trace.c#L1103 rb_tracepoint_enable(tpval); if (rb_block_given_p()) { - return rb_ensure(rb_yield, Qnil, + return rb_ensure(rb_yield, Qundef, previous_tracing ? rb_tracepoint_enable : rb_tracepoint_disable, tpval); } @@ -1154,7 +1154,7 @@ tracepoint_disable_m(VALUE tpval) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_trace.c#L1154 rb_tracepoint_disable(tpval); if (rb_block_given_p()) { - return rb_ensure(rb_yield, Qnil, + return rb_ensure(rb_yield, Qundef, previous_tracing ? rb_tracepoint_enable : rb_tracepoint_disable, tpval); } Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 62693) +++ ruby_2_4/version.h (revision 62694) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.4" -#define RUBY_RELEASE_DATE "2018-03-07" -#define RUBY_PATCHLEVEL 255 +#define RUBY_RELEASE_DATE "2018-03-08" +#define RUBY_PATCHLEVEL 256 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 7 +#define RUBY_RELEASE_DAY 8 #include "ruby/version.h" Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 62693) +++ ruby_2_4 (revision 62694) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r60437 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/