parent
d702379d5f
commit
97599aaad0
2 changed files with 18 additions and 1 deletions
|
@ -9,6 +9,8 @@ module Mutant
|
|||
|
||||
handle(:array)
|
||||
|
||||
children :first
|
||||
|
||||
private
|
||||
|
||||
# Emit mutations
|
||||
|
@ -19,7 +21,7 @@ module Mutant
|
|||
emit_type
|
||||
mutate_body
|
||||
return unless children.one?
|
||||
emit(children.first)
|
||||
emit(first) unless n_splat?(first)
|
||||
end
|
||||
|
||||
# Mutate body
|
||||
|
|
|
@ -8,3 +8,18 @@ Mutant::Meta::Example.add :lvasgn do
|
|||
mutation 'a = false'
|
||||
mutation 'a = nil'
|
||||
end
|
||||
|
||||
Mutant::Meta::Example.add :array, :lvasgn do
|
||||
source 'a = *b'
|
||||
|
||||
singleton_mutations
|
||||
mutation 'a__mutant__ = *b'
|
||||
mutation 'a = nil'
|
||||
mutation 'a = self'
|
||||
mutation 'a = []'
|
||||
mutation 'a = [nil]'
|
||||
mutation 'a = [self]'
|
||||
mutation 'a = [*self]'
|
||||
mutation 'a = [*nil]'
|
||||
mutation 'a = [b]'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue