diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-11 07:49:03 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-11 07:49:03 +0000 |
commit | 8ae178683f6abba8485573d7eb5dcc2232aee29c (patch) | |
tree | fff5bc099f5af9aace1214d925b0c6903039666a /test/ruby/test_settracefunc.rb | |
parent | fb89004a3bb6806b3b571a0592837c0d105e3e61 (diff) | |
download | ruby-8ae178683f6abba8485573d7eb5dcc2232aee29c.tar.gz |
check a thread on TracePoint.
* test/ruby/test_settracefunc.rb: skip if TracePoint probes are invoked by
non-main thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index c274a25cac..b5777d7e58 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -925,6 +925,7 @@ class TestSetTraceFunc < Test::Unit::TestCase bug7774 = '[ruby-dev:46908]' src = %q{ tp = TracePoint.new(:raise) do |tp| + next unless target_thread?g tp.binding end tp.enable do @@ -1492,6 +1493,7 @@ class TestSetTraceFunc < Test::Unit::TestCase def test_tracepoint_callee_id events = [] capture_events = Proc.new{|tp| + next unless target_thread? events << [tp.event, tp.method_id, tp.callee_id] } @@ -1748,6 +1750,7 @@ class TestSetTraceFunc < Test::Unit::TestCase define_method(:m) {} tp = TracePoint.new(:call) do + next unless target_thread? raise '' end |