From b4ec4a41c24105efbb43f9b70ca7f36d22f98294 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 4 Dec 2020 16:40:02 +0100 Subject: Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) && * Otherwise those tests, etc cannot run on alternative Ruby implementations. --- test/ruby/test_optimization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_optimization.rb') diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index b38c52ef2e..d0790c7463 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -452,7 +452,7 @@ class TestRubyOptimization < Test::Unit::TestCase end def test_tailcall_not_to_grow_stack - skip 'currently JIT-ed code always creates a new stack frame' if RubyVM::MJIT.enabled? + skip 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? bug16161 = '[ruby-core:94881]' tailcall("#{<<-"begin;"}\n#{<<~"end;"}") -- cgit v1.2.1