mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
The test for TracePoint with thread had never worked correctly
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcdabb50b8
commit
a30d133a03
1 changed files with 4 additions and 2 deletions
|
@ -812,14 +812,16 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
|
||||
def test_tracepoint_inspect
|
||||
events = []
|
||||
th = nil
|
||||
trace = TracePoint.new{|tp|
|
||||
next if !target_thread?
|
||||
next if !target_thread? && th != Thread.current
|
||||
events << [tp.event, tp.inspect]
|
||||
}
|
||||
assert_equal("#<TracePoint:disabled>", trace.inspect)
|
||||
trace.enable{
|
||||
assert_equal("#<TracePoint:enabled>", trace.inspect)
|
||||
Thread.new{}.join
|
||||
th = Thread.new{}
|
||||
th.join
|
||||
}
|
||||
assert_equal("#<TracePoint:disabled>", trace.inspect)
|
||||
events.each{|(ev, str)|
|
||||
|
|
Loading…
Reference in a new issue