summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 15:23:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 15:23:34 +0000
commite9a9f674fb90266e7c6e2c1338883d2ea35142cc (patch)
treec87755d24aaecc8886a66714f584cf0025e0f377 /test
parentfdb2421c21f94d1a7686c347a3fa189d0874d26d (diff)
merge revision(s) 60437: [Backport #14057]
TracePoint#enable, #disable: Don't yield any argument. [Bug #14057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_settracefunc.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index cf11474ab5..0190ff832e 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{