lib/mutant/mutator/node/if_statement.rb in mutant-0.2.0 vs lib/mutant/mutator/node/if_statement.rb in mutant-0.2.1
- old
+ new
@@ -14,11 +14,11 @@
#
# @api private
#
def dispatch
emit_attribute_mutations(:condition)
- emit_attribute_mutations(:body)
- emit_attribute_mutations(:else) if node.else
+ emit_attribute_mutations(:body) if node.body.class != Rubinius::AST::NilLiteral
+ emit_attribute_mutations(:else) if node.else.class != Rubinius::AST::NilLiteral
emit_inverted_condition
emit_deleted_if_branch
emit_deleted_else_branch
end