summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line/feature_spec.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-28 16:25:25 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-28 16:25:25 +0000
commitb6c04a7ad76b8693048355d0a258731e10f111fd (patch)
treef839e6a39bd6acdaeedd82676af8debf0db35621 /spec/ruby/command_line/feature_spec.rb
parente7477a949c157a700e70afff0675af676b57f00e (diff)
Guard spec against msys2 shell
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/command_line/feature_spec.rb')
-rw-r--r--spec/ruby/command_line/feature_spec.rb9
1 files changed, 7 insertions, 2 deletions
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