From b6c04a7ad76b8693048355d0a258731e10f111fd Mon Sep 17 00:00:00 2001 From: k0kubun Date: Thu, 28 Mar 2019 16:25:25 +0000 Subject: Guard spec against msys2 shell git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/command_line/feature_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'spec/ruby/command_line') diff --git a/spec/ruby/command_line/feature_spec.rb b/spec/ruby/command_line/feature_spec.rb index 95e21de847..66cc0cb71a 100644 --- a/spec/ruby/command_line/feature_spec.rb +++ b/spec/ruby/command_line/feature_spec.rb @@ -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 -- cgit v1.2.3