28 lines
537 B
Ruby
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
|