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