summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/gets_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/gets_spec.rb')
-rw-r--r--spec/ruby/library/stringio/gets_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/gets_spec.rb b/spec/ruby/library/stringio/gets_spec.rb
index 97429e6a29..d597ec0e45 100644
--- a/spec/ruby/library/stringio/gets_spec.rb
+++ b/spec/ruby/library/stringio/gets_spec.rb
@@ -171,6 +171,10 @@ describe "StringIO#gets when passed [limit]" do
it "returns a blank string when passed a limit of 0" do
@io.gets(0).should == ""
end
+
+ it "ignores it when passed a negative limit" do
+ @io.gets(-4).should == "this>is>an>example"
+ end
end
describe "StringIO#gets when passed [separator] and [limit]" do