Rubocop: EmptyLinesAroundArguments with inline private definition

Created on 13 Jan 2018  路  2Comments  路  Source: rubocop-hq/rubocop

class EmptyLinesTest
  private def method
    a = 2

    a + 2
  end
end

Expected behavior

Inspecting 1 file
.

1 file inspected, no offenses detected

Actual behavior

Inspecting 1 file
C

Offenses:

empty_lines_test.rb:6:1: C: Layout/EmptyLinesAroundArguments: Empty line detected around arguments.

1 file inspected, 1 offense detected

RuboCop version

0.52.1 (using Parser 2.4.0.2, running on ruby 2.5.0 x86_64-darwin16)

bug duplicate

All 2 comments

This is indeed broken on 0.52.1. But it's been fixed in our unreleased version with #5340 . See issue #5333 for this example.

Thanks for pointing out!

Was this page helpful?
0 / 5 - 0 ratings