free_mutant/lib/mutant/mutator/node/literal/array.rb
2012-12-06 22:30:57 +01:00

28 lines
537 B
Ruby

module Mutant
class Mutator
class Node
class Literal < self
# Mutator for array literals
class Array < self
handle(Rubinius::AST::ArrayLiteral)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_attribute_mutations(:body)
emit_self([])
emit_nil
emit_self(node.body.dup << new_nil)
end
end
end
end
end
end