1
0
Fork 0
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:
mame 2018-04-17 08:47:58 +00:00
parent fcdabb50b8
commit a30d133a03

View file

@ -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)|