mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix stripping features from the description
This commit is contained in:
parent
a6914c089d
commit
e0818ac659
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ describe "The -v command line option" do
|
|||
|
||||
describe "when used alone" do
|
||||
it "prints version and ends" do
|
||||
ruby_exe(nil, args: '-v').sub("+PRISM ", "").should include(RUBY_DESCRIPTION.sub("+PRISM ", ""))
|
||||
ruby_exe(nil, args: '-v').gsub("+PRISM ", "").should include(RUBY_DESCRIPTION.gsub("+PRISM ", ""))
|
||||
end unless (defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?) ||
|
||||
(defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?) ||
|
||||
(ENV['RUBY_GC_LIBRARY'] && ENV['RUBY_GC_LIBRARY'].length > 0) ||
|
||||
|
|
|
@ -25,12 +25,12 @@ describe "Processing RUBYOPT" do
|
|||
guard -> { RbConfig::CONFIG["CROSS_COMPILING"] != "yes" } do
|
||||
it "prints the version number for '-v'" do
|
||||
ENV["RUBYOPT"] = '-v'
|
||||
ruby_exe("").sub("+PRISM ", "").sub(/\+GC(\[\w+\]\s|\s)?/, "")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "").sub(/\+GC(\[\w+\]\s|\s)?/, "")
|
||||
ruby_exe("")[/\A.*/].gsub(/\s\+(PRISM|GC(\[\w+\])?)(?=\s)/, "").should == RUBY_DESCRIPTION.gsub(/\s\+(PRISM|GC(\[\w+\])?)(?=\s)/, "")
|
||||
end
|
||||
|
||||
it "ignores whitespace around the option" do
|
||||
ENV["RUBYOPT"] = ' -v '
|
||||
ruby_exe("").sub("+PRISM ", "").sub(/\+GC(\[\w+\]\s|\s)?/, "")[/\A.*/].should == RUBY_DESCRIPTION.sub("+PRISM ", "").sub(/\+GC(\[\w+\]\s|\s)?/, "")
|
||||
ruby_exe("")[/\A.*/].gsub(/\s\+(PRISM|GC(\[\w+\])?)(?=\s)/, "").should == RUBY_DESCRIPTION.gsub(/\s\+(PRISM|GC(\[\w+\])?)(?=\s)/, "")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue