lib/rubocop/cop/lint/useless_setter_call.rb in rubocop-0.58.2 vs lib/rubocop/cop/lint/useless_setter_call.rb in rubocop-0.59.0
- old
+ new
@@ -125,18 +125,20 @@
end
def process_logical_operator_assignment(asgn_node)
lhs_node, rhs_node = *asgn_node
return unless ASSIGNMENT_TYPES.include?(lhs_node.type)
+
process_assignment(lhs_node, rhs_node)
throw :skip_children
end
def process_binary_operator_assignment(op_asgn_node)
lhs_node, = *op_asgn_node
return unless ASSIGNMENT_TYPES.include?(lhs_node.type)
+
lhs_variable_name, = *lhs_node
@local[lhs_variable_name] = true
throw :skip_children
end
@@ -153,9 +155,10 @@
end
def constructor?(node)
return true if node.literal?
return false unless node.send_type?
+
_receiver, method = *node
method == :new
end
end
end