summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/copy_stream_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io/copy_stream_spec.rb')
-rw-r--r--spec/ruby/core/io/copy_stream_spec.rb10
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