Sha256: c97269d28fff00451313ddcbb9a4a0d6836243050eb64c6930c4886789be953c
Contents?: true
Size: 757 Bytes
Versions: 28
Compression:
Stored size: 757 Bytes
Contents
# frozen_string_literal: true module Mutant class Mutator class Node class Literal < self # Mutator for regexp literals class Regex < self handle(:regexp) # No input can ever be matched with this NULL_REGEXP_SOURCE = 'nomatch\A' private def options children.last end def dispatch emit_singletons unless parent_node children.each_with_index do |child, index| mutate_child(index) unless n_str?(child) end emit_type(options) emit_type(s(:str, NULL_REGEXP_SOURCE), options) end end # Regex end # Literal end # Node end # Mutator end # Mutant
Version data entries
28 entries across 28 versions & 1 rubygems