Use child nameing in return mutator

This commit is contained in:
Markus Schirp 2013-06-21 15:34:00 +02:00
parent c62b1fc9df
commit 10c611f5e3

View file

@ -6,7 +6,7 @@ module Mutant
handle(:return)
VALUE_INDEX = 0
children :value
private
@ -17,10 +17,9 @@ module Mutant
# @api private
#
def dispatch
value = children.first
if value
emit(value)
mutate_child(VALUE_INDEX)
emit_value_mutations
else
emit_nil
end