parent
ee6b8ddb71
commit
8b7be8a565
3 changed files with 14 additions and 7 deletions
|
@ -9,12 +9,8 @@ module Mutant
|
|||
:self, :zsuper, :not, :or, :and, :defined,
|
||||
:next, :break, :match, :gvar, :cvar, :ensure, :rescue,
|
||||
:dstr, :dsym, :yield, :begin, :rescue, :gvasgn,
|
||||
:lvar,
|
||||
:const,
|
||||
:blockarg,
|
||||
:block_pass,
|
||||
:ivar,
|
||||
:restarg
|
||||
:lvar, :splat, :const, :blockarg, :block_pass,
|
||||
:ivar, :restarg
|
||||
)
|
||||
|
||||
private
|
||||
|
|
|
@ -19,7 +19,7 @@ module Mutant
|
|||
def dispatch
|
||||
emit(left)
|
||||
emit_left_mutations
|
||||
emit(right)
|
||||
emit(right) unless right.type == :splat
|
||||
emit_right_mutations
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,17 @@ describe Mutant::Mutator, 'send' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'single splat arg splat' do
|
||||
let(:source) { 'foo[*bar]' }
|
||||
|
||||
let(:mutations) do
|
||||
mutations = []
|
||||
mutations << 'foo'
|
||||
end
|
||||
|
||||
it_should_behave_like 'a mutator'
|
||||
end
|
||||
|
||||
context 'with self as' do
|
||||
context 'implicit' do
|
||||
let(:source) { 'foo' }
|
||||
|
|
Loading…
Reference in a new issue