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

30 lines
585 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
body = node.body
emit_nil
emit_self([])
emit_self(body.dup << new_nil)
emit_element_presence(body)
emit_body(body)
end
end
end
end
end
end