From 3aeef6bcf0a43a86a621da73c90ce3c8c4e646e6 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Dec 2015 09:03:33 +0000 Subject: [PATCH] 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 --- test/ruby/test_thread.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 516014ac25..e0c61c66f5 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1050,7 +1050,7 @@ q.pop end def test_thread_name - t = Thread.start {} + t = Thread.start {sleep} assert_nil t.name s = t.inspect t.name = 'foo'