mirror of
https://github.com/ruby/ruby.git
synced 2026-01-28 21:14:28 +00:00
Add guard to compaction test in WeakMap
Some platforms don't support compaction, so we should skip this test.
This commit is contained in:
parent
bccec7fb46
commit
bffadcd6d4
@ -178,6 +178,8 @@ class TestWeakMap < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_compaction_bug_19529
|
||||
omit "compaction is not supported on this platform" unless GC.respond_to?(:compact)
|
||||
|
||||
obj = Object.new
|
||||
100.times do |i|
|
||||
GC.compact
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user