summaryrefslogtreecommitdiff
path: root/spec/ruby/library/weakref/fixtures/classes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/weakref/fixtures/classes.rb')
-rw-r--r--spec/ruby/library/weakref/fixtures/classes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/ruby/library/weakref/fixtures/classes.rb b/spec/ruby/library/weakref/fixtures/classes.rb
index 9a1d3ce370..560c58b041 100644
--- a/spec/ruby/library/weakref/fixtures/classes.rb
+++ b/spec/ruby/library/weakref/fixtures/classes.rb
@@ -15,7 +15,8 @@ class WeakRefSpec
weak = nil
10_000.times do
weaks << make_weakref
- 10.times { GC.start }
+ GC.start
+ GC.start
break if weak = weaks.find { |w| !w.weakref_alive? }
end
weak