Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
dfc6e87
commit b6c9b2a
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/fix_space_inside_block_braces_with_numbered_arguments.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#10736](https://github.com/rubocop/rubocop/pull/10736): Fix Layout/SpaceInsideBlockBraces for blocks with numbered arguments. ([@gsamokovarov][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters