class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses

def any_assignment?(node)

def any_assignment?(node)
  node.each_ancestor(*AST::Node::ASSIGNMENTS).any? do |asgn_node|
    # `obj.method = value` parses as (send ... :method= ...), and will
    # not be returned as an `asgn_node` here, however,
    # `obj.method ||= value` parses as (or-asgn (send ...) ...)
    # which IS an `asgn_node`. Similarly, `obj.method += value` parses
    # as (op-asgn (send ...) ...), which is also an `asgn_node`.
    next if asgn_node.shorthand_asgn? && asgn_node.lhs.call_type?
    yield asgn_node
  end
end