lib/rubocop/ast/node/array_node.rb in rubocop-0.49.1 vs lib/rubocop/ast/node/array_node.rb in rubocop-0.50.0

- old
+ new

@@ -41,8 +41,17 @@ loc.begin && loc.begin.source =~ PERCENT_LITERAL_TYPES[type] else loc.begin && loc.begin.source.start_with?('%') end end + + # Checks whether the `array` literal is delimited by either percent or + # square brackets + # + # @return [Boolean] whether the array is enclosed in percent or square + # brackets + def bracketed? + square_brackets? || percent_literal? + end end end end