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/advise_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/io/advise_spec.rb')
| -rw-r--r-- | spec/ruby/core/io/advise_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/io/advise_spec.rb b/spec/ruby/core/io/advise_spec.rb index 81d5a49849..59469fa164 100644 --- a/spec/ruby/core/io/advise_spec.rb +++ b/spec/ruby/core/io/advise_spec.rb @@ -12,37 +12,37 @@ describe "IO#advise" do end it "raises a TypeError if advise is not a Symbol" do - lambda { + -> { @io.advise("normal") }.should raise_error(TypeError) end it "raises a TypeError if offset cannot be coerced to an Integer" do - lambda { + -> { @io.advise(:normal, "wat") }.should raise_error(TypeError) end it "raises a TypeError if len cannot be coerced to an Integer" do - lambda { + -> { @io.advise(:normal, 0, "wat") }.should raise_error(TypeError) end it "raises a RangeError if offset is too big" do - lambda { + -> { @io.advise(:normal, 10 ** 32) }.should raise_error(RangeError) end it "raises a RangeError if len is too big" do - lambda { + -> { @io.advise(:normal, 0, 10 ** 32) }.should raise_error(RangeError) end it "raises a NotImplementedError if advise is not recognized" do - lambda{ + ->{ @io.advise(:foo) }.should raise_error(NotImplementedError) end @@ -92,6 +92,6 @@ describe "IO#advise" do it "raises an IOError if the stream is closed" do @io.close - lambda { @io.advise(:normal) }.should raise_error(IOError) + -> { @io.advise(:normal) }.should raise_error(IOError) end end |
