ruby-changes:51550
From: hsbt <ko1@a...>
Date: Thu, 28 Jun 2018 01:38:53 +0900 (JST)
Subject: [ruby-changes:51550] hsbt:r63772 (trunk): Added guard condition for old ruby about RubyVM::MJIT.
hsbt 2018-06-28 00:56:55 +0900 (Thu, 28 Jun 2018) New Revision: 63772 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63772 Log: 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)` Modified files: trunk/test/lib/minitest/unit.rb Index: test/lib/minitest/unit.rb =================================================================== --- test/lib/minitest/unit.rb (revision 63771) +++ test/lib/minitest/unit.rb (revision 63772) @@ -956,7 +956,7 @@ module MiniTest https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/unit.rb#L956 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/