-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Performance/MapCompact
autocorrect causing invalid syntax
This commit fixes the issue when `Performance/MapCompact` auto-correction fails to detect the argument block of an assignment method so it deletes the block ending (i.e. `end` or `}`) when `map { ... }.compact` is multiline. Before ```ruby object.new_collection = collection.map do |item| end.compact object.new_collection = collection.filter_map do |item| ``` After ```ruby object.new_collection = collection.map do |item| end.compact object.new_collection = collection.filter_map do |item| end ```
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
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