summaryrefslogtreecommitdiff
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_thread.rb')
-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