Releases: mbj/mutant
v0.15.0
-
Add operator mutations.
-
#1523
#1530
Add arithmetic operator swap mutations (+↔-,*↔/).
Multiplication/division skips multiplicative identity operands. -
#1527
Add==↔!=swap mutation. -
#1534
Add logical operator swap mutations (and↔or,&&↔||). -
#1535
#1576
Add compound assignment operator swap mutations
(+=↔-=,*=↔/=,%=→/=,**=→*=,
&=↔|=↔^=,<<=↔>>=,&&=↔||=).
-
-
Add selector replacement mutations.
Orthogonal replacements (circular swaps):
- #1559
select/filter↔reject - #1560
any?↔none? - #1561
take↔drop - #1562
append/push↔prepend/unshift - #1563
positive?↔negative? - #1564
zero?↔nonzero? - #1565
count↔size/length - #1568
keys↔values - #1571
even?↔odd?,min↔max,min_by↔max_by - #1573
all?↔none?,floor↔ceil,
start_with?↔end_with?,transform_keys↔transform_values,upcase↔downcase - #1576
pop↔shift,each_key↔each_value,
assoc↔rassoc,succ↔pred,chars↔bytes,empty?↔any?,
grep↔grep_v
Semantic reductions:
- #1542 Bang → non-bang methods
(e.g.map!→map,sort!→sort,compact!→compact). - #1567
#1572 Enumerable reductions
(collect→each,each_with_object→each,each_with_index→each,
each_cons→each,each_slice→each,sample→first/last,
sort_by→sort). - #1574
filter_map→map,
delete_if→reject,keep_if→select,collect_concat→collect,
chunk/chunk_while/slice_before/slice_after/slice_when→each,
strip→lstrip/rstrip,to_f→to_i,
defined?→true, strip regexpm(multiline) flag.
- #1559
-
Add pattern-matching mutation support. Dedicated mutators for
case/inexpressions,
inpatterns, match alternatives (A | B), and pattern match predicates
(x in pattern→false). Guard clauses in pattern matches are now mutated. -
Add control flow mutations.
while↔untilorthogonal swap mutations.
while_postanduntil_postsupport forbegin...end while/begin...end until
constructs. -
Add
super↔super()mutation operators to test implicit vs explicit
argument forwarding. -
Add rescue clause removal mutations. When multiple rescue clauses exist,
emit mutations that remove each clause individually. -
Add inline rescue modifier mutations (
foo rescue bar→bar). -
Add explicit ensure mutator with ensure-clause reduction.
-
Add empty collection return value mutations (
to_a→[],to_h→{},
to_s→""). -
Add type-aware default return mutations for method bodies
(Array→[],Hash→{},String→"",Integer→0,Float→0.0). -
Add generic receiver promotion mutations for blocks (
a.b { }→a). -
Add non-empty string to empty string mutation.
-
Add literal mutators for complex and rational numeric nodes.
-
Add RSpec 4 support.
-
Dependency updates:
- #1570
Bump parser dependency to ~> 3.3.10 and unparser dependency to ~> 0.8.2.
- #1570
-
Fix bundler stability issue.
v0.14.2
What's Changed
- Fix coverage percentage rounding up to 100% when mutations survive by @sferik in #1512
- Change to allow builds by other peoples PRs by @mbj in #1513
- Add visual progress bar for TTY output by @sferik in #1514
- Add bitwise operator mutations by @sferik in #1516
- Change version to v0.14.2 by @mbj in #1517
- Add improved quick start documentation by @mbj in #1519
- Fix readme badge by @mbj in #1520
Full Changelog: v0.14.1...v0.14.2