diff options
author | Benoit Daloze <[email protected]> | 2020-12-04 16:40:02 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-12-04 16:45:54 +0100 |
commit | b4ec4a41c24105efbb43f9b70ca7f36d22f98294 (patch) | |
tree | 6e257f60ef031d6ea815123c0ce0ed85e10a66be /bootstraptest/runner.rb | |
parent | 83e983ab61b532d17a1177c66e3e43a5042edc1f (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/runner.rb')
-rwxr-xr-x | bootstraptest/runner.rb | 4 |
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) { |