summaryrefslogtreecommitdiff
path: root/test/lib/minitest
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 15:56:55 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 15:56:55 +0000
commit114fec048fd9059923b07b71e84af6e75359b153 (patch)
tree90894c1a1d95c05970ae9d593c2647f6c80b6427 /test/lib/minitest
parent8f6b3ef18455eb16ab03f8d2bd9ac4c73da87a6b (diff)
Added guard condition for old ruby about RubyVM::MJIT.
Test libraries under the test/lib is used with default gems in their repositories. default gems may support old ruby like Ruby 2.5. When default gems invoke test libraries of Ruby core with old ruby, they raised `uninitialized constant RubyVM::MJIT (NameError)` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/minitest')
-rw-r--r--test/lib/minitest/unit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index aa9a09f049e..e8c22c60b77 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -956,7 +956,7 @@ module MiniTest
puts if @verbose
$stdout.flush
- unless RubyVM::MJIT.enabled? # compiler process is wrongly considered as leaked
+ unless defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # compiler process is wrongly considered as leaked
leakchecker.check("#{inst.class}\##{inst.__name__}")
end