summaryrefslogtreecommitdiff
path: root/bootstraptest/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r--bootstraptest/test_thread.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 8d88a0f..3b1fa3f 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -246,3 +246,25 @@ assert_normal_exit %q{
t.join
}
}
+
+assert_equal 'ok', %q{
+ def m
+ t = Thread.new { while true do // =~ "" end }
+ sleep 0.1
+ 10.times {
+ if /((ab)*(ab)*)*(b)/ =~ "ab"*7
+ return :ng if !$4
+ return :ng if $~.size != 5
+ end
+ }
+ :ok
+ ensure
+ Thread.kill t
+ end
+ m
+}, '[ruby-dev:34492]'
+
+assert_normal_exit %q{
+ at_exit { Fiber.new{}.resume }
+}
+