mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
fb89004a3b
commit
8ae178683f
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue