diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-18 14:49:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-18 14:49:43 +0000 |
commit | 3882b07c3a8694e07b30b56e5c2c26c1695122f2 (patch) | |
tree | eebd5b5d658aebca97c4cc3521eda2b36c52c82b /bootstraptest/test_thread.rb | |
parent | 956666cf5ae92d1046106c24e298469d127e3a6e (diff) | |
download | ruby-3882b07c3a8694e07b30b56e5c2c26c1695122f2.tar.gz |
* thread.c (thread_create_core): set thread group before creating
thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r-- | bootstraptest/test_thread.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index 9711535d72..7810455c87 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -160,6 +160,13 @@ assert_equal %q{[1, 1]}, %q{ sleep 0.1 [thg.list.size, ThreadGroup::Default.list.size] } +assert_equal %q{true}, %q{ + thg = ThreadGroup.new + + t = Thread.new{sleep 5} + thg.add t + thg.list.include?(t) +} assert_equal %q{[true, nil, true]}, %q{ /a/ =~ 'a' $a = $~ |