diff --git a/Changelog.md b/Changelog.md index cf32b7b5..3c81ad98 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ * Add -j, --jobs flag to control concurrency. * Fix blind spots on send with block. * Add mutation from `foo { bar }` to `bar` +* Add mutation from `reverse_merge` to `merge` * Fix reporting of diff errors to include context [tjchambers] # v0.5.26 2014-07-07 diff --git a/lib/mutant/mutator/node/send.rb b/lib/mutant/mutator/node/send.rb index 1022cc80..3afbcc05 100644 --- a/lib/mutant/mutator/node/send.rb +++ b/lib/mutant/mutator/node/send.rb @@ -11,18 +11,19 @@ module Mutant children :receiver, :selector SELECTOR_REPLACEMENTS = IceNine.deep_freeze( - reverse_map: [:map, :each], - kind_of?: [:instance_of?], - is_a?: [:instance_of?], - reverse_each: [:each], - map: [:each], - send: [:public_send], - gsub: [:sub], - eql?: [:equal?], - to_s: [:to_str], - to_i: [:to_int], - to_a: [:to_ary], - :== => [:eql?, :equal?] + reverse_map: [:map, :each], + kind_of?: [:instance_of?], + is_a?: [:instance_of?], + reverse_each: [:each], + reverse_merge: [:merge], + map: [:each], + send: [:public_send], + gsub: [:sub], + eql?: [:equal?], + to_s: [:to_str], + to_i: [:to_int], + to_a: [:to_ary], + :== => [:eql?, :equal?] ) private diff --git a/meta/send.rb b/meta/send.rb index d2fd7554..fced444c 100644 --- a/meta/send.rb +++ b/meta/send.rb @@ -7,6 +7,13 @@ Mutant::Meta::Example.add do mutation 'each' end +Mutant::Meta::Example.add do + source 'reverse_merge' + + singleton_mutations + mutation 'merge' +end + Mutant::Meta::Example.add do source 'reverse_map'