Style fixes

This commit is contained in:
Markus Schirp 2013-07-05 03:01:59 +02:00
parent 93da846051
commit e1824db5cc

View file

@ -123,8 +123,7 @@ module Mutant
# @api private # @api private
# #
def mutate_child(index, mutator = Mutator) def mutate_child(index, mutator = Mutator)
children = node.children child = children.at(index)
child = children[index]
mutator.each(child, self) do |mutation| mutator.each(child, self) do |mutation|
emit_child_update(index, mutation) emit_child_update(index, mutation)
end end
@ -147,15 +146,15 @@ module Mutant
# Emit updated child # Emit updated child
# #
# @param [Fixnum] index # @param [Fixnum] index
# @param [Object] update # @param [Parser::AST::Node] node
# #
# @return [undefined] # @return [undefined]
# #
# @api private # @api private
# #
def emit_child_update(index, update) def emit_child_update(index, node)
new_children = children.dup new_children = children.dup
new_children[index]=update new_children[index]=node
emit_self(*new_children) emit_self(*new_children)
end end