class Mutest::Mutator::Node::Regexp::OneOrMore

Mutator for one-or-more quantifier, `+`

Constants

MAP
UNBOUNDED

-1 marks an infinite upper bound

Public Instance Methods

dispatch() click to toggle source

Replace `/a+/` with `/a{2,}/`, `/a+?/` with `/a{2,}?/`, and `/a++/` with `/a{2,}+/`

@return [undefined]

# File lib/mutest/mutator/node/regexp/one_or_more.rb, line 23
def dispatch
  emit(s(MAP.fetch(node.type), 2, UNBOUNDED, subject))
  emit_subject_mutations
  emit(subject)
end