diff --git a/lib/mutant/mutator/node/connective/binary.rb b/lib/mutant/mutator/node/connective/binary.rb index 8b2cbdb1..44b17360 100644 --- a/lib/mutant/mutator/node/connective/binary.rb +++ b/lib/mutant/mutator/node/connective/binary.rb @@ -49,7 +49,7 @@ module Mutant # def mutate_operands emit(s(node.type, n_not(left), right)) - emit(s(node.type, left, n_not(right))) + emit(n_not(node)) end end # Binary diff --git a/spec/unit/mutant/mutator/node/connective/binary/mutation_spec.rb b/spec/unit/mutant/mutator/node/connective/binary/mutation_spec.rb index 2d39469e..a51012d1 100644 --- a/spec/unit/mutant/mutator/node/connective/binary/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/connective/binary/mutation_spec.rb @@ -13,7 +13,7 @@ describe Mutant::Mutator::Node::Connective::Binary, 'mutations' do mutations << 'true or false' mutations << 'not true and false' - mutations << 'true and not false' + mutations << 'not(true and false)' end it_should_behave_like 'a mutator' @@ -31,7 +31,7 @@ describe Mutant::Mutator::Node::Connective::Binary, 'mutations' do mutations << 'true and false' mutations << 'not true or false' - mutations << 'true or not false' + mutations << 'not(true or false)' end it_should_behave_like 'a mutator'