Add explicit mutator for restarg
This commit is contained in:
parent
d7013cd558
commit
e77ff73be2
4 changed files with 18 additions and 2 deletions
|
@ -71,6 +71,7 @@ require 'mutant/mutator/node/noop'
|
|||
require 'mutant/mutator/node/while'
|
||||
require 'mutant/mutator/node/super'
|
||||
require 'mutant/mutator/node/zsuper'
|
||||
require 'mutant/mutator/node/restarg'
|
||||
require 'mutant/mutator/node/send'
|
||||
require 'mutant/mutator/node/send/binary'
|
||||
require 'mutant/mutator/node/when'
|
||||
|
|
|
@ -13,7 +13,7 @@ module Mutant
|
|||
:next, :break, :ensure,
|
||||
:dstr, :dsym, :yield, :rescue, :redo, :defined?,
|
||||
:blockarg, :op_asgn, :and_asgn,
|
||||
:regopt, :restarg, :resbody, :retry, :arg_expr,
|
||||
:regopt, :resbody, :retry, :arg_expr,
|
||||
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
|
||||
:alias, :for, :xstr, :back_ref, :class,
|
||||
:sclass, :match_with_lvasgn, :match_current_line, :or_asgn, :kwbegin
|
||||
|
|
15
lib/mutant/mutator/node/restarg.rb
Normal file
15
lib/mutant/mutator/node/restarg.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
||||
# Restarg mutator
|
||||
class Restarg < Generic
|
||||
|
||||
handle(:restarg)
|
||||
|
||||
end # Restarg
|
||||
end # Node
|
||||
end # Mutator
|
||||
end # Mutant
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Mutant::Mutator::Node::Generic, 'restarg' do
|
||||
describe Mutant::Mutator::Node::Restarg, 'restarg' do
|
||||
let(:source) { 'foo(*bar)' }
|
||||
|
||||
let(:mutations) do
|
||||
|
|
Loading…
Add table
Reference in a new issue