summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line/feature_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/command_line/feature_spec.rb')
-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 66cc0cb71a..b2b6284bc4 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