From ebfe615a0cdffc28a73f279e3df8068831ddbf6e Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 16 Oct 2024 09:45:44 -0400 Subject: [PATCH] Skip GC compaction tests in test_yjit.rb when not supported --- test/ruby/test_yjit.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index c91d631256..5f0a5035b0 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -1150,6 +1150,8 @@ class TestYJIT < Test::Unit::TestCase end def test_code_gc_with_auto_compact + omit "compaction is not supported on this platform" unless GC.respond_to?(:compact) + assert_compiles((code_gc_helpers + <<~'RUBY'), exits: :any, result: :ok, mem_size: 1, code_gc: true) # Test ISEQ moves in the middle of code GC GC.auto_compact = true @@ -1278,6 +1280,8 @@ class TestYJIT < Test::Unit::TestCase end def test_gc_compact_cyclic_branch + omit "compaction is not supported on this platform" unless GC.respond_to?(:compact) + assert_compiles(<<~'RUBY', result: 2) def foo i = 0