ruby-changes:51302
From: eregon <ko1@a...>
Date: Sun, 27 May 2018 18:52:10 +0900 (JST)
Subject: [ruby-changes:51302] eregon:r63508 (trunk): Specs must keep working on older versions and other implementations
eregon 2018-05-27 18:52:04 +0900 (Sun, 27 May 2018) New Revision: 63508 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63508 Log: Specs must keep working on older versions and other implementations Modified files: trunk/spec/ruby/command_line/dash_v_spec.rb trunk/spec/ruby/command_line/rubyopt_spec.rb Index: spec/ruby/command_line/dash_v_spec.rb =================================================================== --- spec/ruby/command_line/dash_v_spec.rb (revision 63507) +++ spec/ruby/command_line/dash_v_spec.rb (revision 63508) @@ -7,7 +7,7 @@ describe "The -v command line option" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/dash_v_spec.rb#L7 describe "when used alone" do it "prints version and ends" do ruby_description = - if RubyVM::MJIT.enabled? + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # fake.rb always drops +JIT from RUBY_DESCRIPTION. This resurrects that. RUBY_DESCRIPTION.sub(/ \[[^\]]+\]$/, ' +JIT\0') else Index: spec/ruby/command_line/rubyopt_spec.rb =================================================================== --- spec/ruby/command_line/rubyopt_spec.rb (revision 63507) +++ spec/ruby/command_line/rubyopt_spec.rb (revision 63508) @@ -23,7 +23,7 @@ describe "Processing RUBYOPT" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/rubyopt_spec.rb#L23 end ruby_description = - if RubyVM::MJIT.enabled? + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # fake.rb always drops +JIT from RUBY_DESCRIPTION. This resurrects that. RUBY_DESCRIPTION.sub(/ \[[^\]]+\]$/, ' +JIT\0') else -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/