diff options
author | Benoit Daloze <[email protected]> | 2022-06-26 14:50:14 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-06-26 14:50:14 +0200 |
commit | d3d5ef0cca160fca538c7f556c5a6e08df5847e6 (patch) | |
tree | 57358b4b9cdd6f429d0383005ac393cb74dd3bff /spec/ruby/library/stringio/gets_spec.rb | |
parent | f616e816372d14e605879d2e43c7fbdda29ef837 (diff) |
Update to ruby/spec@ab32a1a
Diffstat (limited to 'spec/ruby/library/stringio/gets_spec.rb')
-rw-r--r-- | spec/ruby/library/stringio/gets_spec.rb | 4 |
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 |