Skip to content

Commit

Permalink
Merge pull request #1461 from mbj/fix/masgn-mutations
Browse files Browse the repository at this point in the history
Add missing masgn mutations
  • Loading branch information
mbj authored Jan 13, 2025
2 parents a0ff19a + 5d19971 commit 764bb20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/mutant/mutator/node/masgn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class MultipleAssignment < self

def dispatch
emit_singletons
emit_right_mutations
end

end # MultipleAssignment
Expand Down
6 changes: 5 additions & 1 deletion meta/masgn.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# frozen_string_literal: true

Mutant::Meta::Example.add :masgn do
source 'a, b = c, d'
source 'a, b = nil, nil'

singleton_mutations

mutation 'a, b = nil'
mutation 'a, b = []'
mutation 'a, b = [nil]'
end

0 comments on commit 764bb20

Please sign in to comment.