
This is a reaction to the to_source rewrite * Do not use 1.8 specific nodes anymore * Do not generate AST nodes that would not be generatable from source
25 lines
509 B
Ruby
25 lines
509 B
Ruby
module Mutant
|
|
class Mutator
|
|
class Node
|
|
# Mutantor for default arguments
|
|
class DefaultArguments < self
|
|
handle(Rubinius::AST::DefaultArguments)
|
|
|
|
private
|
|
|
|
# Emit mutations
|
|
#
|
|
# @return [undefined]
|
|
#
|
|
# @api private
|
|
#
|
|
def dispatch
|
|
emit_attribute_mutations(:arguments) do |argument|
|
|
argument.names = argument.arguments.map(&:name)
|
|
argument
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|