free_mutant/lib/mutant/mutator/node/literal/array.rb

29 lines
537 B
Ruby
Raw Normal View History

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
2012-12-06 16:30:57 -05:00
emit_attribute_mutations(:body)
emit_self([])
2012-12-06 16:30:57 -05:00
emit_nil
emit_self(node.body.dup << new_nil)
end
end
end
end
end
end