From 114fec048fd9059923b07b71e84af6e75359b153 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 27 Jun 2018 15:56:55 +0000 Subject: 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 --- test/lib/minitest/unit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/lib') diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb index aa9a09f049..e8c22c60b7 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 -- cgit v1.2.3