Skip to content

Commit

Permalink
Simplify. Check is not only dubious, but included in `adjacent_def_mo…
Browse files Browse the repository at this point in the history
…difier?`
  • Loading branch information
marcandre committed Mar 8, 2021
1 parent 8caca8a commit 5e0feb7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rubocop/ast/node/mixin/method_dispatch_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ def arithmetic_operation?
#
# @return [Boolean] whether the dispatched method is a `def` modifier
def def_modifier?
send_type? &&
adjacent_def_modifier? || each_child_node(:send).any?(&:def_modifier?)
adjacent_def_modifier? || each_child_node(:send).any?(&:def_modifier?)
end

# Checks whether this is a lambda. Some versions of parser parses
Expand Down

0 comments on commit 5e0feb7

Please sign in to comment.