summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/readpartial_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
committerBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/stringio/readpartial_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/stringio/readpartial_spec.rb')
-rw-r--r--spec/ruby/library/stringio/readpartial_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/stringio/readpartial_spec.rb b/spec/ruby/library/stringio/readpartial_spec.rb
index 54e2f47004..2601fe8c42 100644
--- a/spec/ruby/library/stringio/readpartial_spec.rb
+++ b/spec/ruby/library/stringio/readpartial_spec.rb
@@ -12,7 +12,7 @@ describe "StringIO#readpartial" do
it "raises IOError on closed stream" do
@string.close
- lambda { @string.readpartial(10) }.should raise_error(IOError)
+ -> { @string.readpartial(10) }.should raise_error(IOError)
end
it "reads at most the specified number of bytes" do
@@ -55,23 +55,23 @@ describe "StringIO#readpartial" do
it "raises EOFError on EOF" do
@string.readpartial(18).should == 'Stop, look, listen'
- lambda { @string.readpartial(10) }.should raise_error(EOFError)
+ -> { @string.readpartial(10) }.should raise_error(EOFError)
end
it "discards the existing buffer content upon error" do
buffer = 'hello'
@string.readpartial(100)
- lambda { @string.readpartial(1, buffer) }.should raise_error(EOFError)
+ -> { @string.readpartial(1, buffer) }.should raise_error(EOFError)
buffer.should be_empty
end
it "raises IOError if the stream is closed" do
@string.close
- lambda { @string.readpartial(1) }.should raise_error(IOError)
+ -> { @string.readpartial(1) }.should raise_error(IOError)
end
it "raises ArgumentError if the negative argument is provided" do
- lambda { @string.readpartial(-1) }.should raise_error(ArgumentError)
+ -> { @string.readpartial(-1) }.should raise_error(ArgumentError)
end
it "immediately returns an empty string if the length argument is 0" do