diff --git a/command_line/rubyopt_spec.rb b/command_line/rubyopt_spec.rb index 18a5959b1..38e29c0d2 100644 --- a/command_line/rubyopt_spec.rb +++ b/command_line/rubyopt_spec.rb @@ -22,15 +22,15 @@ result.should =~ /value of \$DEBUG is true/ end - guard -> { not CROSS_COMPILING } do + guard -> { RbConfig::CONFIG["CROSS_COMPILING"] != "yes" } do it "prints the version number for '-v'" do ENV["RUBYOPT"] = '-v' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "") + ruby_exe("").sub("+PRISM ", "")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "") end it "ignores whitespace around the option" do ENV["RUBYOPT"] = ' -v ' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "") + ruby_exe("").sub("+PRISM ", "")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "") end end