Sha256: 653fb28f7067a3bd9a8169698aee75d33613c7ccafa5a8e492a0f8d01e8abdae

Contents?: true

Size: 727 Bytes

Versions: 17

Compression:

Stored size: 727 Bytes

Contents

module Mutant
  class Mutator
    class Node
      class Literal < self
        # Mutator for regexp literals
        class Regex < self

          handle(:regexp)

          EMPTY_STRING = ''.freeze

          # No input can ever be matched with this
          NULL_REGEXP_SOURCE = 'a\A'.freeze

          children :source, :options

        private

          # Emit mutants
          #
          # @return [undefined]
          #
          # @api private
          #
          def dispatch
            emit_nil
            emit_self(s(:str, EMPTY_STRING), options)
            emit_self(s(:str, NULL_REGEXP_SOURCE), options)
          end

        end # Regex
      end # Literal
    end # Node
  end # Mutator
end # Mutant

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mutant-0.3.0.beta18 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta17 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta16 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta15 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta14 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta13 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta12 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta11 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta10 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta9 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta8 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta7 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta6 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta5 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta4 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta3 lib/mutant/mutator/node/literal/regex.rb
mutant-0.3.0.beta2 lib/mutant/mutator/node/literal/regex.rb