summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line/rubyopt_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2024-11-06 21:57:34 +0100
committerBenoit Daloze <[email protected]>2024-11-06 21:58:28 +0100
commitfdc82cca83bbbfe88f90d2888e139a6dde481101 (patch)
tree99165cce6af5eaca59316c06fed33f958c85e16a /spec/ruby/command_line/rubyopt_spec.rb
parent9bc63e7ba066b31314bbd66def4932b398eaf4c9 (diff)
Update to ruby/spec@54c391e
Diffstat (limited to 'spec/ruby/command_line/rubyopt_spec.rb')
-rw-r--r--spec/ruby/command_line/rubyopt_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/command_line/rubyopt_spec.rb b/spec/ruby/command_line/rubyopt_spec.rb
index 18a5959b18..38e29c0d21 100644
--- a/spec/ruby/command_line/rubyopt_spec.rb
+++ b/spec/ruby/command_line/rubyopt_spec.rb
@@ -22,15 +22,15 @@ describe "Processing RUBYOPT" do
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