ruby-changes:55159
From: k0kubun <ko1@a...>
Date: Fri, 29 Mar 2019 01:25:31 +0900 (JST)
Subject: [ruby-changes:55159] k0kubun:r67366 (trunk): Guard spec against msys2 shell
k0kubun 2019-03-29 01:25:25 +0900 (Fri, 29 Mar 2019) New Revision: 67366 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67366 Log: Guard spec against msys2 shell Modified files: trunk/spec/ruby/command_line/feature_spec.rb Index: spec/ruby/command_line/feature_spec.rb =================================================================== --- spec/ruby/command_line/feature_spec.rb (revision 67365) +++ spec/ruby/command_line/feature_spec.rb (revision 67366) @@ -42,8 +42,13 @@ describe "The --enable and --disable fla https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/feature_spec.rb#L42 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/