2012-07-31 13:45:46 -04:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
2012-08-09 17:07:22 -04:00
|
|
|
class Literal < self
|
2012-07-31 13:45:46 -04:00
|
|
|
# Mutator for empty array literals
|
2012-08-09 17:07:22 -04:00
|
|
|
class EmptyArray < self
|
2012-07-31 13:45:46 -04:00
|
|
|
|
|
|
|
handle(Rubinius::AST::EmptyArray)
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutants
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
emit_nil
|
2012-08-15 15:13:05 -04:00
|
|
|
emit_node(Rubinius::AST::ArrayLiteral, [new_nil])
|
2012-07-31 13:45:46 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|