lib/mutest/mutator/node/define.rb
def emit_restarg_body_mutation
          used_arguments.each do |argument|
            replacement =
              if n_restarg?(argument)
                s(:array)
              elsif n_kwrestarg?(argument)
                s(:hash)
              end

            next unless replacement && argument.children.one?

            emit_body_prepend(s(:lvasgn, AST::Meta::Restarg.new(argument).name, replacement))
          end
        end
# Emit mutation with arg splat as empty array assignment in method
#
# @return [undefined]
Emit mutation with arg splat as empty array assignment in method
Emit mutation with arg splat as empty array assignment in method
def emit_restarg_body_mutation
          used_arguments.each do |argument|
            replacement =
              if n_restarg?(argument)
                s(:array)
              elsif n_kwrestarg?(argument)
                s(:hash)
              end
            next unless replacement && argument.children.one?
            emit_body_prepend(s(:lvasgn, AST::Meta::Restarg.new(argument).name, replacement))
          end
        end
def emit_restarg_body_mutation used_arguments . each do | argument | replacement = if n_restarg? ( argument ) s ( :array ) elsif n_kwrestarg? ( argument ) s ( :hash ) end next unless replacement && argument . children . one? emit_body_prepend ( s ( :lvasgn , AST :: Meta :: Restarg . new ( argument ) . name , replacement ) ) end end
Emit mutation with arg splat as empty array assignment in method
Emit mutation with arg splat as empty array assignment in method
None
undefined