lib/rubocop/cop/lint/unneeded_splat_expansion.rb in rubocop-0.73.0 vs lib/rubocop/cop/lint/unneeded_splat_expansion.rb in rubocop-0.74.0

- old
+ new

@@ -56,10 +56,15 @@ PERCENT_CAPITAL_W = '%W' PERCENT_I = '%i' PERCENT_CAPITAL_I = '%I' ASSIGNMENT_TYPES = %i[lvasgn ivasgn cvasgn gvasgn].freeze - def_node_matcher :array_new?, '$(send (const nil? :Array) :new ...)' + def_node_matcher :array_new?, <<~PATTERN + { + $(send (const nil? :Array) :new ...) + $(block (send (const nil? :Array) :new ...) ...) + } + PATTERN def_node_matcher :literal_expansion, <<~PATTERN (splat {$({str dstr int float array} ...) (block $#array_new? ...) $#array_new?} ...) PATTERN