lib/rubocop/cop/style/bitwise_predicate.rb in rubocop-1.68.0 vs lib/rubocop/cop/style/bitwise_predicate.rb in rubocop-1.69.0
- old
+ new
@@ -69,10 +69,10 @@
(begin
(send _ :& _))
PATTERN
def on_send(node)
- return unless node.receiver.begin_type?
+ return unless node.receiver&.begin_type?
return unless (preferred_method = preferred_method(node))
bit_operation = node.receiver.children.first
lhs, _operator, rhs = *bit_operation
preferred = "#{lhs.source}.#{preferred_method}(#{rhs.source})"