From 7b4eea36d8a839a8d404889bd8efd36d4320a08b Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Fri, 14 Jun 2013 20:00:42 +0200 Subject: [PATCH] Port while mutator to parser --- lib/mutant/mutator/node/while.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/mutant/mutator/node/while.rb b/lib/mutant/mutator/node/while.rb index f48739aa..f57a8e63 100644 --- a/lib/mutant/mutator/node/while.rb +++ b/lib/mutant/mutator/node/while.rb @@ -7,6 +7,8 @@ module Mutant handle(:while) + CONDITION_INDEX, BODY_INDEX = 0, 1 + private # Emit mutations @@ -16,8 +18,8 @@ module Mutant # @api private # def dispatch - emit_attribute_mutations(:condition) - emit_attribute_mutations(:body) + mutate_child(CONDITION_INDEX) + mutate_child(BODY_INDEX) end end # While