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