mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@fd6eddd
This commit is contained in:
parent
44736a6b7a
commit
95d9fe9538
26 changed files with 501 additions and 84 deletions
|
|
@ -13,9 +13,11 @@ class WeakRefSpec
|
|||
def self.make_dead_weakref
|
||||
weaks = []
|
||||
weak = nil
|
||||
10_000.times do
|
||||
1000.times do
|
||||
weaks << make_weakref
|
||||
GC.start
|
||||
end
|
||||
|
||||
1000.times do
|
||||
GC.start
|
||||
break if weak = weaks.find { |w| !w.weakref_alive? }
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue