diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/io/readpartial_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/io/readpartial_spec.rb')
| -rw-r--r-- | spec/ruby/core/io/readpartial_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/io/readpartial_spec.rb b/spec/ruby/core/io/readpartial_spec.rb index 1ab01dcf49..2b33a0d5b1 100644 --- a/spec/ruby/core/io/readpartial_spec.rb +++ b/spec/ruby/core/io/readpartial_spec.rb @@ -15,10 +15,10 @@ describe "IO#readpartial" do end it "raises IOError on closed stream" do - lambda { IOSpecs.closed_io.readpartial(10) }.should raise_error(IOError) + -> { IOSpecs.closed_io.readpartial(10) }.should raise_error(IOError) @rd.close - lambda { @rd.readpartial(10) }.should raise_error(IOError) + -> { @rd.readpartial(10) }.should raise_error(IOError) end it "reads at most the specified number of bytes" do @@ -70,23 +70,23 @@ describe "IO#readpartial" do @wr.write("abc") @wr.close @rd.readpartial(10).should == 'abc' - lambda { @rd.readpartial(10) }.should raise_error(EOFError) + -> { @rd.readpartial(10) }.should raise_error(EOFError) end it "discards the existing buffer content upon error" do buffer = 'hello' @wr.close - lambda { @rd.readpartial(1, buffer) }.should raise_error(EOFError) + -> { @rd.readpartial(1, buffer) }.should raise_error(EOFError) buffer.should be_empty end it "raises IOError if the stream is closed" do @wr.close - lambda { @rd.readpartial(1) }.should raise_error(IOError) + -> { @rd.readpartial(1) }.should raise_error(IOError) end it "raises ArgumentError if the negative argument is provided" do - lambda { @rd.readpartial(-1) }.should raise_error(ArgumentError) + -> { @rd.readpartial(-1) }.should raise_error(ArgumentError) end it "immediately returns an empty string if the length argument is 0" do |
