diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-27 02:00:09 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-27 02:00:09 +0000 |
commit | 8079f8a6f25bd1e6ef9fa0bff569a850c31c6fb3 (patch) | |
tree | 932a03ce36029b926ca796ec72c11dac71ab20f1 /test/ruby/test_thread.rb | |
parent | 82cc52ed9373fee7c846e9cf73a67e7a3c94be88 (diff) | |
download | ruby-8079f8a6f25bd1e6ef9fa0bff569a850c31c6fb3.tar.gz |
* thread.c (thread_join): raises ThreadError if target thread
is a current thread.
* test/ruby/test_thread.rb (test_thread_join_current):
test for the above.
* NEWS: news for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 518ad40333..95f2c89db4 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -876,6 +876,9 @@ class TestThreadGroup < Test::Unit::TestCase } end - - + def test_thread_join_current + assert_raises(ThreadError) do + Thread.current.join + end + end end |