ruby-changes:55155
From: k0kubun <ko1@a...>
Date: Fri, 29 Mar 2019 00:25:47 +0900 (JST)
Subject: [ruby-changes:55155] k0kubun:r67362 (trunk): Do not fail with --disable-jit-support
k0kubun 2019-03-29 00:25:43 +0900 (Fri, 29 Mar 2019) New Revision: 67362 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67362 Log: Do not fail with --disable-jit-support 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 67361) +++ spec/ruby/command_line/feature_spec.rb (revision 67362) @@ -39,10 +39,17 @@ describe "The --enable and --disable fla https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/feature_spec.rb#L39 ruby_version_is "2.6" do it "can be used with jit" do - ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "true" ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false" - ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "true" 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 + 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/