ruby-changes:50661
From: usa <ko1@a...>
Date: Mon, 19 Mar 2018 00:23:38 +0900 (JST)
Subject: [ruby-changes:50661] usa:r62824 (ruby_2_3): merge revision(s) 60437: [Backport #14057]
usa 2018-03-19 00:23:34 +0900 (Mon, 19 Mar 2018) New Revision: 62824 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62824 Log: merge revision(s) 60437: [Backport #14057] TracePoint#enable, #disable: Don't yield any argument. [Bug #14057] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/test/ruby/test_settracefunc.rb branches/ruby_2_3/version.h branches/ruby_2_3/vm_trace.c Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 62823) +++ ruby_2_3/version.h (revision 62824) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.7" #define RUBY_RELEASE_DATE "2018-03-19" -#define RUBY_PATCHLEVEL 424 +#define RUBY_PATCHLEVEL 425 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_3/vm_trace.c =================================================================== --- ruby_2_3/vm_trace.c (revision 62823) +++ ruby_2_3/vm_trace.c (revision 62824) @@ -1087,7 +1087,7 @@ tracepoint_enable_m(VALUE tpval) https://github.com/ruby/ruby/blob/trunk/ruby_2_3/vm_trace.c#L1087 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); } @@ -1138,7 +1138,7 @@ tracepoint_disable_m(VALUE tpval) https://github.com/ruby/ruby/blob/trunk/ruby_2_3/vm_trace.c#L1138 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_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 62823) +++ ruby_2_3/ChangeLog (revision 62824) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Mon Mar 19 00:22:52 2018 Marc-Andre Lafortune <ruby-core@m...> + + TracePoint#enable, #disable: Don't yield any argument. [Bug #14057] + Mon Mar 19 00:21:00 2018 SHIBATA Hiroshi <hsbt@r...> Clarify the behavior of IO.write without offset in write mode. Index: ruby_2_3/test/ruby/test_settracefunc.rb =================================================================== --- ruby_2_3/test/ruby/test_settracefunc.rb (revision 62823) +++ ruby_2_3/test/ruby/test_settracefunc.rb (revision 62824) @@ -639,16 +639,19 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_3/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_3/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_3 =================================================================== --- ruby_2_3 (revision 62823) +++ ruby_2_3 (revision 62824) Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r60437 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/