summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-18 14:49:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-18 14:49:43 +0000
commit215a7a8003bd292ad6bb23e141aa187919f1e9ed (patch)
treeeebd5b5d658aebca97c4cc3521eda2b36c52c82b /bootstraptest
parent24bd30901b80856b2751a2545657fbbf3528fd33 (diff)
downloadruby-215a7a8003bd292ad6bb23e141aa187919f1e9ed.tar.gz
ruby-215a7a8003bd292ad6bb23e141aa187919f1e9ed.tar.xz
ruby-215a7a8003bd292ad6bb23e141aa187919f1e9ed.zip
* thread.c (thread_create_core): set thread group before creating
thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_thread.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 9711535d7..7810455c8 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 = $~