-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive for
Style/ArgumentsForwarding
This PR fixes a false positive for `Style/ArgumentsForwarding` when using block arg forwarding to within block with Ruby 3.3.0. The following `anonymous block parameter is also used within block (SyntaxError)` occurs in Ruby 3.3.0: ```console $ cat example.rb def baz(qux, quuz, &) with_block do bar(qux, quuz, &) end end $ ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] example.rb: example.rb:3: anonymous block parameter is also used within block (SyntaxError) ``` This fix is based on the following comment: #12571 (comment)
- Loading branch information
Showing
3 changed files
with
12 additions
and
15 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/fix_a_false_positive_for_style_arguments_forwarding.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 @@ | ||
* [#12720](https://github.com/rubocop/rubocop/issues/12720): Fix a false positive for `Style/ArgumentsForwarding` when using block arg forwarding to within block with Ruby 3.3.0. ([@koic][]) |
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