summaryrefslogtreecommitdiff
path: root/test/ruby/test_optimization.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2020-12-04 16:40:02 +0100
committerBenoit Daloze <[email protected]>2020-12-04 16:45:54 +0100
commitb4ec4a41c24105efbb43f9b70ca7f36d22f98294 (patch)
tree6e257f60ef031d6ea815123c0ce0ed85e10a66be /test/ruby/test_optimization.rb
parent83e983ab61b532d17a1177c66e3e43a5042edc1f (diff)
Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &&
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
Diffstat (limited to 'test/ruby/test_optimization.rb')
-rw-r--r--test/ruby/test_optimization.rb2
1 files changed, 1 insertions, 1 deletions
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;"}")