Simpify equal ast mutation with predicate.

This commit is contained in:
Markus Schirp 2012-07-30 21:56:25 +02:00
parent ef9172bca4
commit 2b7e9c60c2

View file

@ -6,10 +6,8 @@ module Mutant
end
def append(node)
p same_node?(node)
unless same_node?(node)
@block.call(node)
end
return if same_node?(node)
@block.call(node)
end
# FIXME: Use interhitable alias once in support gem.