summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-12 20:06:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-12 20:06:59 +0000
commitdaa3de4737a25b11a6d6cad3b8ddc039d9982d01 (patch)
treef8aee31917999e2adab92570fcc437cc4c60b0cb /bootstraptest
parent864856cd198a6ea575470cac1ce59cea91aed0f6 (diff)
downloadruby-daa3de4737a25b11a6d6cad3b8ddc039d9982d01.tar.gz
ruby-daa3de4737a25b11a6d6cad3b8ddc039d9982d01.tar.xz
ruby-daa3de4737a25b11a6d6cad3b8ddc039d9982d01.zip
* thread.c (rb_thread_raise): check if target thread is
thrown by another thread or not. [ruby-dev:31371] * bootstraptest/test_thread.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_thread.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 64d685fa1..40ccbad49 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -169,3 +169,17 @@ assert_equal %q{11}, %q{
Thread.current[:a]
}.value + Thread.current[:a]
}
+assert_equal %q{1000}, %q{
+begin
+ 1000.times do |i|
+ begin
+ Thread.start(Thread.current) {|u| u.raise }
+ raise
+ rescue
+ ensure
+ end
+ end
+rescue
+ 1000
+end
+}, '[ruby-dev:31371]'