free_mutant/lib/mutant/mutator/node/noop.rb
2013-06-19 01:40:19 +02:00

34 lines
720 B
Ruby

module Mutant
class Mutator
class Node
# Mutator that does not do mutations on ast
class Noop < self
# Literal references to self do not need to be mutated?
handle(
:self, :zsuper, :not, :or, :and, :defined,
:next, :break, :match, :gvar, :cvar, :ensure, :rescue,
:dstr, :dsym, :yield, :begin, :rescue, :gvasgn,
:lvar,
:const,
:blockarg,
:block_pass,
:ivar,
:restarg
)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
end
end # Noop
end # Node
end # Mutator
end # Mutant