diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-26 06:58:09 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-26 06:58:09 +0000 |
commit | 7e3bd6646ca88a285f0eb369a668c6596e0d6c83 (patch) | |
tree | ab17a2b7b0f20ace6e7a7c9dc92b77102cdd8e0d /test/ruby | |
parent | 464cda55c582c7c667ff4095c5598de1579a0c28 (diff) | |
download | ruby-7e3bd6646ca88a285f0eb369a668c6596e0d6c83.tar.gz |
TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index c5c914d0b0..15a8d8b98e 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -639,16 +639,19 @@ class TestSetTraceFunc < Test::Unit::TestCase 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::TestCase 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{ |