lib/rubocop/cop/rspec/match_array.rb in rubocop-rspec-2.20.0 vs lib/rubocop/cop/rspec/match_array.rb in rubocop-rspec-2.21.0
- old
+ new
@@ -32,10 +32,10 @@
def_node_matcher :match_array_with_empty_array?, <<~PATTERN
(send nil? :match_array (array))
PATTERN
def on_send(node)
- return unless node.first_argument.array_type?
+ return unless node.first_argument&.array_type?
return if match_array_with_empty_array?(node)
check_populated_array(node)
end