You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[~/scratch/b] $ rubocop -V
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.6-compliant syntax, but you are running 2.1.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
0.34.1 (using Parser 2.2.2.6, running on ruby 2.1.5 x86_64-darwin14.0)
Note that the line with the problem is line 2, not line 1, as reported below:
[~/scratch/b] $ rubocop -D r.rb
...
Inspecting 1 file
C
Offenses:
r.rb:1:1: C: Style/SymbolProc: Pass &:nil? as an argument to reject instead of a block.
[{ b: 1 }, { b: nil }].map { |element| element[:b] }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected
Similarly, the fixing, though done properly, reports the wrong line as having changed:
[~/scratch/b] $ rubocop -D r.rb -a
...
Inspecting 1 file
C
Offenses:
r.rb:1:1: C: [Corrected] Style/SymbolProc: Pass &:nil? as an argument to reject instead of a block.
[{ b: 1 }, { b: nil }].map { |element| element[:b] }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected, 1 offense corrected
The text was updated successfully, but these errors were encountered:
The file:
Latest version of rubocop:
Note that the line with the problem is line 2, not line 1, as reported below:
Similarly, the fixing, though done properly, reports the wrong line as having changed:
The text was updated successfully, but these errors were encountered: