Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Layout/SpaceInsideBlockBraces for blocks with numbered arguments #10736

Merged
merged 1 commit into from Jun 22, 2022

Commits on Jun 22, 2022

  1. Fix Layout/SpaceInsideBlockBraces for blocks with numbered arguments

    The `Layout/SpaceInsideBlockBraces` was not being applied for blocks with
    numbered arguments as they have AST node type of `numblock` and the cop
    only ran for `block` nodes.
    
    At Dext we caught spacing errors during code review and wandered why the
    cop didn't run at all. The piece of code was in the lines of
    
    ```ruby
    Tax.where(condition).partition {_1.by_something}
    ```
    
    Not running Layout/SpaceInsideBlockBraces for `numblock` nodes was the
    cause.
    gsamokovarov committed Jun 22, 2022
    Copy the full SHA
    b6c9b2a View commit details
    Browse the repository at this point in the history