Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix lstrip and rstrip spec in spec/core

  • Loading branch information...
commit 93539aae5f19b7ee78ef223c45da98cd37f24d70 1 parent 294aca4
Santiago Pastorino spastorino authored
8 spec/core/string/lstrip_spec.rb
@@ -4,14 +4,14 @@
4 4 it "returns a string with all leading \\000 and whitespace characters removed" do
5 5 "".lstrip.should == ""
6 6 " hello ".lstrip.should == "hello "
7   - "\000 hello ".lstrip.should == "hello "
8   - "\000\t \000hello ".lstrip.should == "hello "
  7 + "\000 hello ".lstrip.should == "\000 hello "
  8 + "\000\t \000hello ".lstrip.should == "\000\t \000hello "
9 9 "hello".lstrip.should == "hello"
10 10 end
11 11
12 12 it "modifies self by removing all leading \\000 and whitespace characters" do
13 13 "\n\t This \000".lstrip!.should == "This \000"
14   - "\000 another one".lstrip!.should == "another one"
15   - "\000 \000\t\v\000two ".lstrip!.should == "two "
  14 + "\000 another one".lstrip!.should == nil
  15 + "\000 \000\t\v\000two ".lstrip!.should == nil
16 16 end
17 17 end
6 spec/core/string/rstrip_spec.rb
@@ -8,15 +8,15 @@
8 8 " hello ".rstrip.rstrip.should == " hello"
9 9 "\tgoodbye\r\n".rstrip.rstrip.should == "\tgoodbye"
10 10 "goodbye \000".rstrip.rstrip.should == "goodbye"
11   - "goodbye \000\t \f \000".rstrip.rstrip.should == "goodbye"
  11 + "goodbye \000\t \f \000".rstrip.rstrip.should == "goodbye"
12 12 end
13 13
14 14 it "modifies self by removing all trailing \\000 and whitespace characters" do
15 15 " hello ".rstrip!.should == " hello"
16 16 "\tgoodbye\r\n".rstrip!.should == "\tgoodbye"
17 17 "goodbye \000".rstrip!.should == "goodbye"
18   - "goodbye \000 ".rstrip!.should == "goodbye"
  18 + "goodbye \000 ".rstrip!.should == "goodbye \000"
19 19 "".rstrip!.should == nil
20   - " \n \000\v\000".rstrip!.should == ""
  20 + " \n \000\v\000".rstrip!.should == " \n \000"
21 21 end
22 22 end

0 comments on commit 93539aa

Please sign in to comment.
Something went wrong with that request. Please try again.