We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ef87ec commit 8ae1f84Copy full SHA for 8ae1f84
spec/ruby/core/thread/list_spec.rb
@@ -35,8 +35,21 @@
35
t.join
36
end
37
38
-end
39
40
-describe "Thread.list" do
41
- it "needs to be reviewed for spec completeness"
+ it "returns instances of Thread and not null or nil values" do
+ spawner = Thread.new do
+ Array.new(100) do
42
+ Thread.new {}
43
+ end
44
45
+
46
+ while spawner.alive?
47
+ Thread.list.each { |th|
48
+ th.should be_kind_of(Thread)
49
+ }
50
51
52
+ threads = spawner.value
53
+ threads.each(&:join)
54
55
0 commit comments