Rubocop: Layout/SpaceBeforeBlockBraces false-positive

Created on 18 Dec 2017  路  2Comments  路  Source: rubocop-hq/rubocop

Expected behavior

ruby_block 'thing' do
  block {}
end

should be valid, but I get:

default.rb:11:10: C: Layout/SpaceBeforeBlockBraces: Space detected to the left of {.
    block {}

Actual behavior

got above error.

Steps to reproduce the problem

above code

RuboCop version

$ rubocop -V
0.52.0 (using Parser 2.4.0.2, running on ruby 2.3.5 x86_64-linux)
bug duplicate

Most helpful comment

This issue related to #5221 and fixed by #5263. Thank you.

All 2 comments

To be clear this is fixed by explicitly setting EnforcedStyleForEmptyBraces: space - but that's supposed to be the default.

This issue related to #5221 and fixed by #5263. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bquorning picture bquorning  路  3Comments

tedPen picture tedPen  路  3Comments

mlammers picture mlammers  路  3Comments

NobodysNightmare picture NobodysNightmare  路  3Comments

Aqualon picture Aqualon  路  3Comments