diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/stringio/seek_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/stringio/seek_spec.rb')
-rw-r--r-- | spec/ruby/library/stringio/seek_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/stringio/seek_spec.rb b/spec/ruby/library/stringio/seek_spec.rb index b963b77eef..253b5027a9 100644 --- a/spec/ruby/library/stringio/seek_spec.rb +++ b/spec/ruby/library/stringio/seek_spec.rb @@ -33,14 +33,14 @@ describe "StringIO#seek" do end it "raises an Errno::EINVAL error on negative amounts when whence is IO::SEEK_SET" do - lambda { @io.seek(-5, IO::SEEK_SET) }.should raise_error(Errno::EINVAL) + -> { @io.seek(-5, IO::SEEK_SET) }.should raise_error(Errno::EINVAL) end it "raises an Errno::EINVAL error on incorrect whence argument" do - lambda { @io.seek(0, 3) }.should raise_error(Errno::EINVAL) - lambda { @io.seek(0, -1) }.should raise_error(Errno::EINVAL) - lambda { @io.seek(0, 2**16) }.should raise_error(Errno::EINVAL) - lambda { @io.seek(0, -2**16) }.should raise_error(Errno::EINVAL) + -> { @io.seek(0, 3) }.should raise_error(Errno::EINVAL) + -> { @io.seek(0, -1) }.should raise_error(Errno::EINVAL) + -> { @io.seek(0, 2**16) }.should raise_error(Errno::EINVAL) + -> { @io.seek(0, -2**16) }.should raise_error(Errno::EINVAL) end it "tries to convert the passed Object to a String using #to_int" do @@ -51,7 +51,7 @@ describe "StringIO#seek" do end it "raises a TypeError when the passed Object can't be converted to an Integer" do - lambda { @io.seek(Object.new) }.should raise_error(TypeError) + -> { @io.seek(Object.new) }.should raise_error(TypeError) end end @@ -62,6 +62,6 @@ describe "StringIO#seek when self is closed" do end it "raises an IOError" do - lambda { @io.seek(5) }.should raise_error(IOError) + -> { @io.seek(5) }.should raise_error(IOError) end end |