Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an edge case in
omit_parentheses
style of `Style/MethodCallWith…
…ArgsParentheses` Before this change: ```ruby foo(a) || bar(b) do ^^^ Omit parentheses for method calls with arguments. pass end ``` This resulted in a `SyntaxError`, if corrected. The check for a call with logical operator did not take into account that the parent of a send node with a block is the block node itself. After this change, the code below is lawful: ```ruby foo(a) || bar(b) do pass end ```
- Loading branch information
1 parent
1a6ef08
commit c7d6d76
Showing
3 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
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
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