Simply send mutator logic for naked receiver
This commit is contained in:
parent
19531d7d0b
commit
2c3416b99b
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue