[前][次][番号順一覧][スレッド一覧]

ruby-changes:55196

From: eregon <ko1@a...>
Date: Tue, 2 Apr 2019 05:45:59 +0900 (JST)
Subject: [ruby-changes:55196] eregon:r67403 (trunk): Simplify spec as there is no easy way to tell if MJIT support is available

eregon	2019-04-02 05:45:55 +0900 (Tue, 02 Apr 2019)

  New Revision: 67403

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67403

  Log:
    Simplify spec as there is no easy way to tell if MJIT support is available

  Modified files:
    trunk/spec/ruby/command_line/feature_spec.rb
Index: spec/ruby/command_line/feature_spec.rb
===================================================================
--- spec/ruby/command_line/feature_spec.rb	(revision 67402)
+++ spec/ruby/command_line/feature_spec.rb	(revision 67403)
@@ -39,22 +39,10 @@ describe "The --enable and --disable fla https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/feature_spec.rb#L39
 
   ruby_version_is "2.6" do
     it "can be used with jit" do
+      # Only test if it can be disabled, because MJIT does not support all platforms, and
+      # it can be disabled at build time with `./configure --disable-jit-support`.
       ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false"
       ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false"
-
-      mjit_disabled = false
-      begin
-        warning = IO.popen([RbConfig.ruby, '--jit-warning', '-e', ''], err: [:child, :out], &:read)
-        mjit_disabled = warning.include?('warning: MJIT support is disabled.') # ./configure --disable-jit-support
-      rescue Errno::ENOENT # for msys2 https://ci.appveyor.com/project/ruby/ruby/builds/23429035/job/dvjqa34m9pxvv2nt
-      end
-      if mjit_disabled
-        ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "false"
-        ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "false"
-      else
-        ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "true"
-        ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "true"
-      end
     end
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]