Skip to content

Commit

Permalink
Remove a redundant condition for Style/TrailingBodyOnMethodDefinition
Browse files Browse the repository at this point in the history
Follow #9548.

I noticed redundancy when writing `Style/TrailingBodyOnMethodDefinition` cop's
example description.
  • Loading branch information
koic authored and bbatsov committed Mar 5, 2021
1 parent 3b9ad8f commit 538c06d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ class TrailingBodyOnMethodDefinition < Base

def on_def(node)
return unless trailing_body?(node)
return if node.endless? && node.body.parenthesized_call?
return if node.endless?

add_offense(first_part_of(node.body)) do |corrector|
LineBreakCorrector.correct_trailing_body(
Expand Down

0 comments on commit 538c06d

Please sign in to comment.