test_thread.rb: stay alive
* test/ruby/test_thread.rb (test_thread_name): the target thread needs to stay alive till the end of this test, so that inspected result would not change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8e5595b5ee
commit
3aeef6bcf0
@ -1050,7 +1050,7 @@ q.pop
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_thread_name
|
def test_thread_name
|
||||||
t = Thread.start {}
|
t = Thread.start {sleep}
|
||||||
assert_nil t.name
|
assert_nil t.name
|
||||||
s = t.inspect
|
s = t.inspect
|
||||||
t.name = 'foo'
|
t.name = 'foo'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user