diff --git a/Changelog.md b/Changelog.md index 0d1be9d1..7af565e7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ * Parallel execution / reporting. * Add -j, --jobs flag to control concurrency. * Fix blind spots on send with block. +* Add mutation from `foo { bar }` to `bar` # v0.5.26 2014-07-07 diff --git a/lib/mutant/mutator/node/block.rb b/lib/mutant/mutator/node/block.rb index 0d4f1263..4027138c 100644 --- a/lib/mutant/mutator/node/block.rb +++ b/lib/mutant/mutator/node/block.rb @@ -22,6 +22,7 @@ module Mutant emit_send_mutations(&method(:n_send?)) emit_arguments_mutations if body + emit(body) emit_body_mutations end emit_body(nil) diff --git a/meta/block.rb b/meta/block.rb index 782576e5..afb8614d 100644 --- a/meta/block.rb +++ b/meta/block.rb @@ -1,7 +1,7 @@ # encoding: utf-8 Mutant::Meta::Example.add do - source 'foo() { a; b }' + source 'foo { a; b }' singleton_mutations mutation 'foo { a }' @@ -13,6 +13,7 @@ Mutant::Meta::Example.add do mutation 'foo { nil; b }' mutation 'foo { self; b }' mutation 'foo' + mutation 'a; b' end Mutant::Meta::Example.add do