class RuboCop::Cop::Lint::RedundantRegexpQuantifiers
def each_redundantly_quantified_pair(node)
def each_redundantly_quantified_pair(node) seen = Set.new node.parsed_tree&.each_expression do |(expr)| next if seen.include?(expr) || !redundant_group?(expr) || !mergeable_quantifier(expr) expr.each_expression do |(subexp)| seen << subexp break unless redundantly_quantifiable?(subexp) yield(expr, subexp) if mergeable_quantifier(subexp) end end end