1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Guard spec against msys2 shell

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2019-03-28 16:25:25 +00:00
parent e7477a949c
commit b6c04a7ad7

View file

@ -42,8 +42,13 @@ describe "The --enable and --disable flags" do
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false"
warning = IO.popen([RbConfig.ruby, '--jit-warning', '-e', ''], err: [:child, :out], &:read)
if warning.include?('warning: MJIT support is disabled.') # ./configure --disable-jit-support
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