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/copy_stream_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/io/copy_stream_spec.rb')
| -rw-r--r-- | spec/ruby/core/io/copy_stream_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/io/copy_stream_spec.rb b/spec/ruby/core/io/copy_stream_spec.rb index 622be0818b..c541e96e14 100644 --- a/spec/ruby/core/io/copy_stream_spec.rb +++ b/spec/ruby/core/io/copy_stream_spec.rb @@ -31,7 +31,7 @@ describe :io_copy_stream_to_file, shared: true do obj = mock("io_copy_stream_to") obj.should_receive(:to_path).and_return(1) - lambda { IO.copy_stream(@object.from, obj) }.should raise_error(TypeError) + -> { IO.copy_stream(@object.from, obj) }.should raise_error(TypeError) end end @@ -71,7 +71,7 @@ describe :io_copy_stream_to_io, shared: true do it "raises an IOError if the destination IO is not open for writing" do @to_io.close @to_io = new_io @to_name, "r" - lambda { IO.copy_stream @object.from, @to_io }.should raise_error(IOError) + -> { IO.copy_stream @object.from, @to_io }.should raise_error(IOError) end it "does not close the destination IO" do @@ -125,7 +125,7 @@ describe "IO.copy_stream" do it "raises an IOError if the source IO is not open for reading" do @from_io.close @from_io = new_io @from_bigfile, "a" - lambda { IO.copy_stream @from_io, @to_name }.should raise_error(IOError) + -> { IO.copy_stream @from_io, @to_name }.should raise_error(IOError) end it "does not close the source IO" do @@ -183,7 +183,7 @@ describe "IO.copy_stream" do obj = mock("io_copy_stream_from") obj.should_receive(:to_path).and_return(1) - lambda { IO.copy_stream(obj, @to_name) }.should raise_error(TypeError) + -> { IO.copy_stream(obj, @to_name) }.should raise_error(TypeError) end describe "to a file name" do @@ -222,7 +222,7 @@ describe "IO.copy_stream" do platform_is_not :windows do it "raises an error when an offset is specified" do - lambda { IO.copy_stream(@from_io, @to_name, 8, 4) }.should raise_error(Errno::ESPIPE) + -> { IO.copy_stream(@from_io, @to_name, 8, 4) }.should raise_error(Errno::ESPIPE) end end |
