summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/chomp_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/chomp_spec.rb')
-rw-r--r--spec/ruby/core/string/chomp_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/string/chomp_spec.rb b/spec/ruby/core/string/chomp_spec.rb
index 6fa8d7c6c5..3c20141ee7 100644
--- a/spec/ruby/core/string/chomp_spec.rb
+++ b/spec/ruby/core/string/chomp_spec.rb
@@ -158,6 +158,10 @@ describe "String#chomp" do
it "does not taint the result when the argument is tainted" do
"abc".chomp("abc".taint).tainted?.should be_false
end
+
+ it "returns an empty String when the argument equals self" do
+ "abc".chomp("abc").should == ""
+ end
end
end