Sha256: 1b76be46169cf30498fe1314dfe44ca9cca956c3d5edfa67dc80e76670990479
Contents?: true
Size: 970 Bytes
Versions: 18
Compression:
Stored size: 970 Bytes
Contents
module Mutant class Mutator class Node class Literal < self # Mutator for regexp literals class Regex < self handle(Rubinius::AST::RegexLiteral) private # Emit mutants # # @return [undefined] # # @api private # def dispatch emit_nil emit_self('') # match all emit_self('a\A') # match nothing emit_new { new_self(Random.hex_string) } end # Return new Rubinius::AST::Regex # # @param [String] source # # @param [Integer] options # options of regexp, defaults to mutation subject node options # # @return [undefined] # # @api private # def new_self(source,options=nil) super(source,options || node.options) end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems