ruby-changes:56682
From: Benoit <ko1@a...>
Date: Sun, 28 Jul 2019 10:11:20 +0900 (JST)
Subject: [ruby-changes:56682] Benoit Daloze: 5c276e1cc9 (master): Update to ruby/spec@875a09e
https://git.ruby-lang.org/ruby.git/commit/?id=5c276e1cc9 From 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 27 Jul 2019 12:40:09 +0200 Subject: Update to ruby/spec@875a09e diff --git a/spec/ruby/.mspec.constants b/spec/ruby/.mspec.constants index 68a8777..00198eb 100644 --- a/spec/ruby/.mspec.constants +++ b/spec/ruby/.mspec.constants @@ -28,7 +28,6 @@ CSAutoloadC https://github.com/ruby/ruby/blob/trunk/spec/ruby/.mspec.constants#L28 CSAutoloadD CSV ChainedNextTest -Channel ChildClass ClassIdUnderAutoload ClassSpecDefineClass diff --git a/spec/ruby/.rubocop.yml b/spec/ruby/.rubocop.yml index 5de7154..cc31ff5 100644 --- a/spec/ruby/.rubocop.yml +++ b/spec/ruby/.rubocop.yml @@ -100,3 +100,18 @@ Lint/UriRegexp: https://github.com/ruby/ruby/blob/trunk/spec/ruby/.rubocop.yml#L100 Lint/Debugger: Exclude: - 'core/binding/fixtures/irb.rb' + +Style/Lambda: + Enabled: true + EnforcedStyle: literal + Exclude: + - 'language/lambda_spec.rb' + - 'language/proc_spec.rb' + - 'core/kernel/lambda_spec.rb' + +Style/EmptyLambdaParameter: + Enabled: true + +Style/StabbyLambdaParentheses: + Enabled: true + EnforcedStyle: require_no_parentheses diff --git a/spec/ruby/.rubocop_todo.yml b/spec/ruby/.rubocop_todo.yml index 25c67ad..261fde9 100644 --- a/spec/ruby/.rubocop_todo.yml +++ b/spec/ruby/.rubocop_todo.yml @@ -144,6 +144,9 @@ Lint/UselessAccessModifier: https://github.com/ruby/ruby/blob/trunk/spec/ruby/.rubocop_todo.yml#L144 - 'core/module/fixtures/classes.rb' - 'core/module/module_function_spec.rb' - 'core/module/private_class_method_spec.rb' + - 'core/module/private_spec.rb' + - 'core/module/protected_spec.rb' + - 'core/module/public_spec.rb' - 'language/fixtures/send.rb' # Offense count: 6186 diff --git a/spec/ruby/core/argf/close_spec.rb b/spec/ruby/core/argf/close_spec.rb index 56faf30..d4d6a51 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/close_spec.rb#L22 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 4662641..804a459 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/read_nonblock_spec.rb#L64 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 bd3bfd2..4eca2ef 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/readchar_spec.rb#L13 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 e196274..db53c49 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/readline_spec.rb#L17 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 4e69768..5e284b3 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/readpartial_spec.rb#L16 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/readpartial_spec.rb#L59 @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 fcb2e81..b29f0b7 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/rewind_spec.rb#L33 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 c983c0c..2b73bd4 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/seek_spec.rb#L57 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 bba18ed..0e684f9 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/shared/eof.rb#L18 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 891e250..5d67404 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/shared/fileno.rb#L18 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 f7184f3..9836d5f 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/shared/pos.rb#L25 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 89b7146..0181801 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/skip_spec.rb#L37 # 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 diff --git a/spec/ruby/core/array/allocate_spec.rb b/spec/ruby/core/array/allocate_spec.rb index a1800e7..04f7c0d 100644 --- a/spec/ruby/core/array/allocate_spec.rb +++ b/spec/ruby/core/array/allocate_spec.rb @@ -14,6 +14,6 @@ describe "Array.allocate" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/allocate_spec.rb#L14 end it "does not accept any arguments" do - lambda { Array.allocate(1) }.should raise_error(ArgumentError) + -> { Array.allocate(1) }.should raise_error(ArgumentError) end end diff --git a/spec/ruby/core/array/append_spec.rb b/spec/ruby/core/array/append_spec.rb index 08ea814..302dc4a 100644 --- a/spec/ruby/core/array/append_spec.rb +++ b/spec/ruby/core/array/append_spec.rb @@ -31,7 +31,7 @@ describe "Array#<<" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/append_spec.rb#L31 end it "raises a #{frozen_error_class} on a frozen array" do - lambda { ArraySpecs.frozen_array << 5 }.should raise_error(frozen_error_class) + -> { ArraySpecs.frozen_array << 5 }.should raise_error(frozen_error_class) end end diff --git a/spec/ruby/core/array/at_spec.rb b/spec/ruby/core/array/at_spec.rb index d2 (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/