summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 02:00:40 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 02:00:40 +0000
commit9ace5c122e9ad5203e98590adfc3896464b67ec1 (patch)
tree9dd83c8b1b7d57572a26148f934b5a477b930a8e /test
parent863e08732624822bac9fe546dc13ef2b6d23e542 (diff)
* eval.c (ruby_cleanup): set thread status to THREAD_KILLED
for preventing thr.raise. * test/ruby/test_thread.rb (test_main_thread_status_at_exit): test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index fb2efec552..13d1a3ff65 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -889,4 +889,16 @@ class TestThreadGroup < Test::Unit::TestCase
}.join
end
end
+
+ def test_main_thread_status_at_exit
+ assert_in_out_err([], <<-INPUT, %w(false), [])
+Thread.new(Thread.current) {|mth|
+ begin
+ sleep 0.1
+ ensure
+ p mth.alive?
+ end
+}
+ INPUT
+ end
end