From 6a88e9d43088f51d3d9dde9c89f24836ab715810 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 11 Oct 2024 14:01:08 -0400 Subject: [PATCH] Used respond_to? check for compaction in test_gc_compact.rb --- test/ruby/test_gc_compact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index 26d7c71687..15bf574f6b 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -9,7 +9,7 @@ end class TestGCCompact < Test::Unit::TestCase module CompactionSupportInspector def supports_auto_compact? - GC::OPTS.include?("GC_COMPACTION_SUPPORTED") + GC.respond_to?(:compact) end end