Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak autocorrection for
Style/RedundantBegin
This PR tweaks autocorrection for `Style/RedundantBegin` when using endless method definition with redundant `begin`. ```ruby def foo = begin bar end ``` ## Before ```console % bundle exec rubocop --only Style/RedundantBegin -a (snip) example.rb:1:11: C: [Corrected] Style/RedundantBegin: Redundant begin block detected. def foo = begin ^^^^^ 1 file inspected, 1 offense detected, 1 offense corrected ``` ```ruby def foo = bar ``` ## After ```ruby def foo = bar ``` This would be more closer to a one-liner endless idiom.
- Loading branch information