Skip to content

Commit

Permalink
Remove mutations to semantically equivalent mutation on endless ranges
Browse files Browse the repository at this point in the history
[Fix #1036]
  • Loading branch information
mbj committed Aug 25, 2020
1 parent 245a27b commit 2c33899
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.9.11 2020-08-25

* Remove mutation to equivalent semantics on endless ranges [#1036](https://github.com/mbj/mutant/pull/1036).

# v0.9.10 2020-08-25

* Remove bounds to allow `diff-lcs 1.4.x` [#1032](https://github.com/mbj/mutant/pull/1032).
Expand Down
7 changes: 5 additions & 2 deletions lib/mutant/mutator/node/literal/range.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ class Range < self

def dispatch
emit_singletons
emit_inverse
emit_lower_bound_mutations
emit_upper_bound_mutations if upper_bound

return unless upper_bound

emit_inverse
emit_upper_bound_mutations
end

def emit_inverse
Expand Down
2 changes: 0 additions & 2 deletions meta/range.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
singleton_mutations
mutation '-1...'
mutation '0...'
mutation '1..'
mutation '2...'
mutation 'nil...'
mutation 'self...'
Expand All @@ -57,7 +56,6 @@
singleton_mutations
mutation '-1..'
mutation '0..'
mutation '1...'
mutation '2..'
mutation 'nil..'
mutation 'self..'
Expand Down

0 comments on commit 2c33899

Please sign in to comment.