diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-28 15:25:43 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-28 15:25:43 +0000 |
commit | 68987d4ae1a14d96047074599079acc2997e76e9 (patch) | |
tree | 7a2b59090b39869e463806ea24bbe1fdd8888c1d /spec | |
parent | a28aa80c739a1d169649a4da833ef48cfb3465b3 (diff) | |
download | ruby-68987d4ae1a14d96047074599079acc2997e76e9.tar.gz |
Do not fail with --disable-jit-support
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/command_line/feature_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/ruby/command_line/feature_spec.rb b/spec/ruby/command_line/feature_spec.rb index fa2a82cb4b..95e21de847 100644 --- a/spec/ruby/command_line/feature_spec.rb +++ b/spec/ruby/command_line/feature_spec.rb @@ -39,10 +39,17 @@ describe "The --enable and --disable flags" do 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 |