summaryrefslogtreecommitdiff
path: root/bootstraptest
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 /bootstraptest
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 'bootstraptest')
-rwxr-xr-xbootstraptest/runner.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 94a90f5e95..334d7a62b4 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -383,8 +383,8 @@ def assert_normal_exit(testsrc, *rest, timeout: nil, **opt)
end
def assert_finish(timeout_seconds, testsrc, message = '')
- if RubyVM.const_defined? :MJIT
- timeout_seconds *= 3 if RubyVM::MJIT.enabled? # for --jit-wait
+ if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ timeout_seconds *= 3
end
newtest
show_progress(message) {