summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2023-06-25 12:29:49 +0900
committernagachika <nagachika@ruby-lang.org>2023-06-25 12:29:49 +0900
commite3d10dedf106357d2b17fc8786d35035e0b366cf (patch)
treea80e7c918b878f8b0b164db83f0c471c6e962f70 /test
parent3ebcbb537d7ae37e49c49e05b28d2cc5b324f151 (diff)
merge revision(s) bffadcd6d46ccfccade79ce0efb60ced8eac4483: [Backport #19529]
Add guard to compaction test in WeakMap Some platforms don't support compaction, so we should skip this test. --- test/ruby/test_weakmap.rb | 2 ++ 1 file changed, 2 insertions(+)
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_weakmap.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_weakmap.rb b/test/ruby/test_weakmap.rb
index 9bbe2d6b81..6455034743 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