diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index c91d6312560ec6..5f0a5035b0a4fc 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -1150,6 +1150,8 @@ def test_code_gc_with_many_iseqs 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 @@ def foo(_, a, b, c) 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