lib/mutest/mutator/node/case.rb in mutest-0.0.9 vs lib/mutest/mutator/node/case.rb in mutest-0.0.10
- old
+ new
@@ -35,13 +35,15 @@
#
# @return [undefined]
def emit_else_mutations
else_branch = children.last
else_index = children.length - 1
+
return unless else_branch
+
mutate_child(else_index)
emit_child_update(else_index, nil)
end
- end # Case
- end # Node
- end # Mutator
-end # Mutest
+ end
+ end
+ end
+end