ruby-changes:51622
From: nobu <ko1@a...>
Date: Tue, 3 Jul 2018 13:43:30 +0900 (JST)
Subject: [ruby-changes:51622] nobu:r63833 (trunk): rubyopt_spec.rb: skip -v in RUBYOPT examples
nobu 2018-07-03 13:43:25 +0900 (Tue, 03 Jul 2018) New Revision: 63833 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63833 Log: rubyopt_spec.rb: skip -v in RUBYOPT examples * spec/ruby/command_line/rubyopt_spec.rb: skip -v in RUBYOPT examples when CROSS_COMPILING is set by fake.rb. the version number by -v is printed before loading libraries by -r options, so setting RUBY_DESCRIPTION in fake.rb has no effect. Modified files: trunk/spec/ruby/command_line/rubyopt_spec.rb Index: spec/ruby/command_line/rubyopt_spec.rb =================================================================== --- spec/ruby/command_line/rubyopt_spec.rb (revision 63832) +++ spec/ruby/command_line/rubyopt_spec.rb (revision 63833) @@ -22,14 +22,16 @@ describe "Processing RUBYOPT" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/rubyopt_spec.rb#L22 result.should =~ /value of \$DEBUG is true/ end - it "prints the version number for '-v'" do - ENV["RUBYOPT"] = '-v' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION - end + unless CROSS_COMPILING + it "prints the version number for '-v'" do + ENV["RUBYOPT"] = '-v' + ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + end - it "ignores whitespace around the option" do - ENV["RUBYOPT"] = ' -v ' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + it "ignores whitespace around the option" do + ENV["RUBYOPT"] = ' -v ' + ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + end end it "sets $VERBOSE to true for '-w'" do -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/