aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 09:03:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 09:03:33 +0000
commit218df67379746bfbb9968d83dfaf0594690ce7c7 (patch)
treed4eaced8817dc5f8d0e92724cff900844baf740e
parenteb5be57a7e8acd1e24ff11be369031ebff2ca83e (diff)
downloadruby-218df67379746bfbb9968d83dfaf0594690ce7c7.tar.gz
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
-rw-r--r--test/ruby/test_thread.rb2
1 files changed, 1 insertions, 1 deletions
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'