From fbe60a5684f529eae4fecbeece5cf083643bf830 Mon Sep 17 00:00:00 2001 From: John Backus Date: Mon, 10 Aug 2015 14:25:50 -0700 Subject: [PATCH] Add mutation `super` -> `super()` closes #309 --- Changelog.md | 1 + config/flay.yml | 2 +- lib/mutant/mutator/node/zsuper.rb | 1 + meta/super.rb | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 33935dbe..b0227529 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ * Remove invalid mutation `foo or bar` to `!(foo or bar)` see #287 * Add mutation from `#to_h` to `#to_hash` #218 * Add mutation from `#defined?` to `true` / `false` #334 +* Add mutation from `super` to `super()` #309 # v0.8.1 2015-07-24 diff --git a/config/flay.yml b/config/flay.yml index c8a9cc0b..a8e5c2a1 100644 --- a/config/flay.yml +++ b/config/flay.yml @@ -1,3 +1,3 @@ --- threshold: 18 -total_score: 1213 +total_score: 1206 diff --git a/lib/mutant/mutator/node/zsuper.rb b/lib/mutant/mutator/node/zsuper.rb index 658b737b..dde2733c 100644 --- a/lib/mutant/mutator/node/zsuper.rb +++ b/lib/mutant/mutator/node/zsuper.rb @@ -16,6 +16,7 @@ module Mutant # @api private def dispatch emit_singletons + emit(N_EMPTY_SUPER) end end # ZSuper diff --git a/meta/super.rb b/meta/super.rb index 0fb54f71..2e0f01f4 100644 --- a/meta/super.rb +++ b/meta/super.rb @@ -2,6 +2,7 @@ Mutant::Meta::Example.add do source 'super' singleton_mutations + mutation 'super()' end Mutant::Meta::Example.add do