summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-01 20:45:55 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-01 20:45:55 +0000
commit960d059ef71901980c95cd28013b7a93bc3f83d5 (patch)
tree4d904a1a9e0490f06c56469c9d7b5c71e5aae8b5 /spec/ruby/command_line
parentd48783bb0236db505fe1205d1d9822309de53a36 (diff)
Simplify spec as there is no easy way to tell if MJIT support is available
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/command_line')
-rw-r--r--spec/ruby/command_line/feature_spec.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/spec/ruby/command_line/feature_spec.rb b/spec/ruby/command_line/feature_spec.rb
index 66cc0cb71ad..b2b6284bc49 100644
--- a/spec/ruby/command_line/feature_spec.rb
+++ b/spec/ruby/command_line/feature_spec.rb
@@ -39,22 +39,10 @@ describe "The --enable and --disable flags" do
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