diff --git a/Changelog.md b/Changelog.md index b63770cf..108065f0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# v0.2.15 2013-01-10 + +* [change] Do not mutate super to super() anymore. This needs a context check in future. + +[Compare v0.2.14..v0.2.15](https://github.com/mbj/mutant/compare/v0.2.14...v0.2.15) + # v0.2.14 2013-01-09 * [change] Do not emit mutation to { nil => nil } for hash literals diff --git a/lib/mutant/mutator/node/noop.rb b/lib/mutant/mutator/node/noop.rb index 50ed8f31..0649a5b0 100644 --- a/lib/mutant/mutator/node/noop.rb +++ b/lib/mutant/mutator/node/noop.rb @@ -8,6 +8,7 @@ module Mutant handle(Rubinius::AST::Self) # Currently unhandled node classes. Feel free to contribute your mutator! + handle(Rubinius::AST::ZSuper) handle(Rubinius::AST::ElementAssignment) handle(Rubinius::AST::AttributeAssignment) handle(Rubinius::AST::Not) diff --git a/lib/mutant/mutator/node/super.rb b/lib/mutant/mutator/node/super.rb index 38c3f29f..a99553df 100644 --- a/lib/mutant/mutator/node/super.rb +++ b/lib/mutant/mutator/node/super.rb @@ -2,23 +2,6 @@ module Mutant class Mutator class Node - # Mutator for super without parantheses - class ZSuper < self - - handle(Rubinius::AST::ZSuper) - - # Emit mutations - # - # @return [undefined] - # - # @api private - # - def dispatch - emit_node(Rubinius::AST::Super, new(Rubinius::AST::ActualArguments)) - end - - end - # Mutator for super with parantheses class Super < self handle(Rubinius::AST::Super) diff --git a/mutant.gemspec b/mutant.gemspec index 3d6edf9d..517f03f0 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |gem| gem.name = 'mutant' - gem.version = '0.2.14' + gem.version = '0.2.15' gem.authors = [ 'Markus Schirp' ] gem.email = [ 'mbj@seonic.net' ] gem.description = 'Mutation testing for ruby' diff --git a/spec/unit/mutant/mutator/node/super/mutation_spec.rb b/spec/unit/mutant/mutator/node/super/mutation_spec.rb index ecf40d6c..f51b941a 100644 --- a/spec/unit/mutant/mutator/node/super/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/super/mutation_spec.rb @@ -5,12 +5,7 @@ describe Mutant::Mutator, 'super' do context 'with no arguments' do let(:source) { 'super' } - let(:mutations) do - mutations = [] - mutations << 'super()' - end - - it_should_behave_like 'a mutator' + it_should_behave_like 'a noop mutator' end context 'with explicit empty arguments' do