diff --git a/config/flay.yml b/config/flay.yml index cb7eb82bf..09a2c4f72 100644 --- a/config/flay.yml +++ b/config/flay.yml @@ -1,3 +1,3 @@ --- threshold: 16 -total_score: 1321 +total_score: 1316 diff --git a/lib/mutant/mutator/node/send.rb b/lib/mutant/mutator/node/send.rb index 5d047193e..3dd6a03dc 100644 --- a/lib/mutant/mutator/node/send.rb +++ b/lib/mutant/mutator/node/send.rb @@ -182,7 +182,7 @@ def emit_drop_mutation # # @return [undefined] def emit_integer_mutation - return unless selector.equal?(:to_i) + return unless receiver && selector.equal?(:to_i) emit(s(:send, nil, :Integer, receiver)) end diff --git a/meta/send.rb b/meta/send.rb index 1870e4aed..ef9837d8b 100644 --- a/meta/send.rb +++ b/meta/send.rb @@ -135,6 +135,13 @@ mutation 'map' end +Mutant::Meta::Example.add :send do + source 'to_i' + + singleton_mutations + mutation 'to_int' +end + Mutant::Meta::Example.add :send do source 'foo.to_s'