aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_fiber.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index f3cfaa273b..6c5bb891a2 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -33,16 +33,18 @@ class TestFiber < Test::Unit::TestCase
end
def test_many_fibers
- max = 10000
+ max = 10_000
assert_equal(max, max.times{
Fiber.new{}
})
+ GC.start # force collect created fibers
assert_equal(max,
max.times{|i|
Fiber.new{
}.resume
}
)
+ GC.start # force collect created fibers
end
def test_many_fibers_with_threads