summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-12-04 16:40:02 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-12-04 16:45:54 +0100
commitb4ec4a41c24105efbb43f9b70ca7f36d22f98294 (patch)
tree6e257f60ef031d6ea815123c0ce0ed85e10a66be /test/lib
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/lib')
-rw-r--r--test/lib/jit_support.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index e2bc766ed1..2f6d637ec9 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -74,7 +74,7 @@ module JITSupport
end
def remove_mjit_logs(stderr)
- if RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE
+ if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE
stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')
else
stderr