Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mutations to semantically equivalent mutation on endless ranges #1036

Merged
merged 2 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# v0.9.10 2020-09-26
# 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).
* Fix crash on endless ranges [#1026](https://github.com/mbj/mutant/pull/1026).
* Fix memoized subjects to preserve freezer option [#973](https://github.com/mbj/mutant/pull/973).

# v0.9.9 2020-09-25
# v0.9.9 2020-08-25

+ Add support for mutating methods inside eigenclasses `class <<`. [#1009](https://github.com/mbj/mutant/pull/1009)
- Remove `<` -> `<=` and `>` -> `>=` mutations as non canonical. [#1020](https://github.com/mbj/mutant/pull/1020)
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