lib/mutant/mutator/node/binary.rb in mutant-0.8.8 vs lib/mutant/mutator/node/binary.rb in mutant-0.8.9

- old
+ new

@@ -16,12 +16,10 @@ private # Emit mutations # # @return [undefined] - # - # @api private def dispatch emit_singletons emit_promotions emit_operator_mutations emit_left_negation @@ -30,42 +28,35 @@ end # Emit operator mutations # # @return [undefined] - # - # @api private def emit_operator_mutations emit(s(INVERSE.fetch(node.type), left, right)) end # Emit promotions # # @return [undefined] - # - # @api private - # def emit_promotions emit(left) emit(right) end # Emit left negation # # We do not emit right negation as the `and` and `or` nodes # in ruby are also used for control flow. # - # Irrespectable of their syntax, aka `||` parses internally to `or`. + # Irrespective of their syntax, aka `||` parses internally to `or`. # # `do_a or do_b`. Negating left makes sense, negating right - # only when the result is actualy used. + # only when the result is actually used. # # It *would* be possible to emit the right negation in case the use of the result is proved. # Like parent is an assignment to an {l,i}var. Dunno if we ever get the time to do that. # # @return [undefined] - # - # @api private def emit_left_negation emit(s(node.type, n_not(left), right)) end end # Binary