class Regexp::Expression::Subexpression
def each_expression(include_self = false, &block)
If the block takes two arguments, the indices of the children within
given block.
Traverses the expression, passing each recursive child to the
def each_expression(include_self = false, &block) return enum_for(__method__, include_self) unless block if block.arity == 1 block.call(self) if include_self each_expression_without_index(&block) else block.call(self, 0) if include_self each_expression_with_index(&block) end end