Simply send mutator logic for naked receiver

This commit is contained in:
Markus Schirp 2014-06-15 12:01:38 +00:00
parent 19531d7d0b
commit 2c3416b99b

View file

@ -101,11 +101,8 @@ module Mutant
# @api private # @api private
# #
def emit_naked_receiver def emit_naked_receiver
return unless receiver return if OP_ASSIGN.include?(parent_type) && NOT_ASSIGNABLE.include?(receiver.type)
op_assign = OP_ASSIGN.include?(parent_type) emit(receiver) if receiver
not_assignable = NOT_ASSIGNABLE.include?(receiver.type)
return if op_assign and not_assignable
emit(receiver)
end end
# Test for binary operator # Test for binary operator