diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-04-06 13:35:25 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-04-06 13:35:25 -0400 |
commit | bffadcd6d46ccfccade79ce0efb60ced8eac4483 (patch) | |
tree | 07ec057544eca87ab44ebd36ca00e80008e4cd6f | |
parent | bccec7fb468ad977be75e7e4c2644b4ea845ab0c (diff) | |
download | ruby-bffadcd6d46ccfccade79ce0efb60ced8eac4483.tar.gz |
Add guard to compaction test in WeakMap
Some platforms don't support compaction, so we should skip this test.
-rw-r--r-- | test/ruby/test_weakmap.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_weakmap.rb b/test/ruby/test_weakmap.rb index c72e7310db..7fc956dfae 100644 --- a/test/ruby/test_weakmap.rb +++ b/test/ruby/test_weakmap.rb @@ -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 |