Sha256: e7ae6ff3625d00c2e8892a3215b23fd6e17b1233285ffd2cb262d1f4a4d83391
Contents?: true
Size: 916 Bytes
Versions: 9
Compression:
Stored size: 916 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 # Original regexp options # # @return [Parser::AST::Node] def options children.last end # Emit mutations # # @return [undefined] 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
9 entries across 9 versions & 1 rubygems