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/core/argf | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/argf')
-rw-r--r-- | spec/ruby/core/argf/close_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/core/argf/read_nonblock_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/readchar_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/readline_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/readpartial_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/argf/rewind_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/seek_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/shared/eof.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/shared/fileno.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/shared/pos.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/argf/skip_spec.rb | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/spec/ruby/core/argf/close_spec.rb b/spec/ruby/core/argf/close_spec.rb index 56faf30664..d4d6a51e72 100644 --- a/spec/ruby/core/argf/close_spec.rb +++ b/spec/ruby/core/argf/close_spec.rb @@ -22,8 +22,8 @@ describe "ARGF.close" do it "doesn't raise an IOError if called on a closed stream" do argf [@file1_name] do - lambda { @argf.close }.should_not raise_error - lambda { @argf.close }.should_not raise_error + -> { @argf.close }.should_not raise_error + -> { @argf.close }.should_not raise_error end end end diff --git a/spec/ruby/core/argf/read_nonblock_spec.rb b/spec/ruby/core/argf/read_nonblock_spec.rb index 466264119f..804a459a62 100644 --- a/spec/ruby/core/argf/read_nonblock_spec.rb +++ b/spec/ruby/core/argf/read_nonblock_spec.rb @@ -64,7 +64,7 @@ platform_is_not :windows do it 'raises IO::EAGAINWaitReadable when empty' do argf ['-'] do - lambda { + -> { @argf.read_nonblock(4) }.should raise_error(IO::EAGAINWaitReadable) end diff --git a/spec/ruby/core/argf/readchar_spec.rb b/spec/ruby/core/argf/readchar_spec.rb index bd3bfd28ae..4eca2efcf7 100644 --- a/spec/ruby/core/argf/readchar_spec.rb +++ b/spec/ruby/core/argf/readchar_spec.rb @@ -13,7 +13,7 @@ describe "ARGF.readchar" do it "raises EOFError when end of stream reached" do argf [@file1, @file2] do - lambda { while @argf.readchar; end }.should raise_error(EOFError) + -> { while @argf.readchar; end }.should raise_error(EOFError) end end end diff --git a/spec/ruby/core/argf/readline_spec.rb b/spec/ruby/core/argf/readline_spec.rb index e196274068..db53c499e9 100644 --- a/spec/ruby/core/argf/readline_spec.rb +++ b/spec/ruby/core/argf/readline_spec.rb @@ -17,7 +17,7 @@ describe "ARGF.readline" do it "raises an EOFError when reaching end of files" do argf [@file1, @file2] do - lambda { while @argf.readline; end }.should raise_error(EOFError) + -> { while @argf.readline; end }.should raise_error(EOFError) end end end diff --git a/spec/ruby/core/argf/readpartial_spec.rb b/spec/ruby/core/argf/readpartial_spec.rb index 4e697683dc..5e284b3423 100644 --- a/spec/ruby/core/argf/readpartial_spec.rb +++ b/spec/ruby/core/argf/readpartial_spec.rb @@ -16,7 +16,7 @@ describe "ARGF.readpartial" do it "raises an ArgumentError if called without a maximum read length" do argf [@file1_name] do - lambda { @argf.readpartial }.should raise_error(ArgumentError) + -> { @argf.readpartial }.should raise_error(ArgumentError) end end @@ -59,8 +59,8 @@ describe "ARGF.readpartial" do @argf.readpartial(@file1.size) @argf.readpartial(1) @argf.readpartial(@file2.size) - lambda { @argf.readpartial(1) }.should raise_error(EOFError) - lambda { @argf.readpartial(1) }.should raise_error(EOFError) + -> { @argf.readpartial(1) }.should raise_error(EOFError) + -> { @argf.readpartial(1) }.should raise_error(EOFError) end end diff --git a/spec/ruby/core/argf/rewind_spec.rb b/spec/ruby/core/argf/rewind_spec.rb index fcb2e81a3e..b29f0b75b7 100644 --- a/spec/ruby/core/argf/rewind_spec.rb +++ b/spec/ruby/core/argf/rewind_spec.rb @@ -33,7 +33,7 @@ describe "ARGF.rewind" do it "raises an ArgumentError when end of stream reached" do argf [@file1_name, @file2_name] do @argf.read - lambda { @argf.rewind }.should raise_error(ArgumentError) + -> { @argf.rewind }.should raise_error(ArgumentError) end end end diff --git a/spec/ruby/core/argf/seek_spec.rb b/spec/ruby/core/argf/seek_spec.rb index c983c0cb5a..2b73bd46fb 100644 --- a/spec/ruby/core/argf/seek_spec.rb +++ b/spec/ruby/core/argf/seek_spec.rb @@ -57,7 +57,7 @@ describe "ARGF.seek" do it "takes at least one argument (offset)" do argf [@file1_name] do - lambda { @argf.seek }.should raise_error(ArgumentError) + -> { @argf.seek }.should raise_error(ArgumentError) end end end diff --git a/spec/ruby/core/argf/shared/eof.rb b/spec/ruby/core/argf/shared/eof.rb index bba18ede50..0e684f943f 100644 --- a/spec/ruby/core/argf/shared/eof.rb +++ b/spec/ruby/core/argf/shared/eof.rb @@ -18,7 +18,7 @@ describe :argf_eof, shared: true do it "raises IOError when called on a closed stream" do argf [@file1] do @argf.read - lambda { @argf.send(@method) }.should raise_error(IOError) + -> { @argf.send(@method) }.should raise_error(IOError) end end end diff --git a/spec/ruby/core/argf/shared/fileno.rb b/spec/ruby/core/argf/shared/fileno.rb index 891e250ad9..5d674048e2 100644 --- a/spec/ruby/core/argf/shared/fileno.rb +++ b/spec/ruby/core/argf/shared/fileno.rb @@ -18,7 +18,7 @@ describe :argf_fileno, shared: true do it "raises an ArgumentError when called on a closed stream" do argf [@file1] do @argf.read - lambda { @argf.send(@method) }.should raise_error(ArgumentError) + -> { @argf.send(@method) }.should raise_error(ArgumentError) end end end diff --git a/spec/ruby/core/argf/shared/pos.rb b/spec/ruby/core/argf/shared/pos.rb index f7184f3d7c..9836d5f1e4 100644 --- a/spec/ruby/core/argf/shared/pos.rb +++ b/spec/ruby/core/argf/shared/pos.rb @@ -25,7 +25,7 @@ describe :argf_pos, shared: true do it "raises an ArgumentError when called on a closed stream" do argf [@file1] do @argf.read - lambda { @argf.send(@method) }.should raise_error(ArgumentError) + -> { @argf.send(@method) }.should raise_error(ArgumentError) end end end diff --git a/spec/ruby/core/argf/skip_spec.rb b/spec/ruby/core/argf/skip_spec.rb index 89b7146e3a..0181801c2d 100644 --- a/spec/ruby/core/argf/skip_spec.rb +++ b/spec/ruby/core/argf/skip_spec.rb @@ -37,6 +37,6 @@ describe "ARGF.skip" do # which as a side-effect calls argf.file which will initialize # internals of ARGF enough for this to work. it "has no effect when nothing has been processed yet" do - lambda { ARGF.class.new(@file1_name).skip }.should_not raise_error + -> { ARGF.class.new(@file1_name).skip }.should_not raise_error end end |