class RuboCop::Cop::Lint::OutOfRangeRegexpRef

def on_when(node)

def on_when(node)
  regexp_conditions = node.conditions.select(&:regexp_type?)
  @valid_ref = regexp_conditions.map do |condition|
    check_regexp(condition)
  end.compact.max
end