Skip to content

Commit

Permalink
Add guard to compaction test in WeakMap
Browse files Browse the repository at this point in the history
Some platforms don't support compaction, so we should skip this test.
  • Loading branch information
peterzhu2118 committed Apr 6, 2023
1 parent bccec7f commit bffadcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/ruby/test_weakmap.rb
Expand Up @@ -178,6 +178,8 @@ def test_no_memory_leak
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
Expand Down

0 comments on commit bffadcd

Please sign in to comment.