@api private
 checking whether correct arguments passed to proxy methods.

 @raise [ArgumentError] if more than two arguments given
 @raise [ArgumentError] if both argument and block given
324358
def valid_proxy_arguments? left_method, *args, &proc
      args.size > 2 && raise(ArgumentError, '#%s - wrong number of arguments, %i for 0..2' % [left_method, args.size])
      args.size > 0 && proc && raise(ArgumentError, '#%s accepts either arguments or a block, not both' % left_method)
    end
597262
def method_missing(*args, &block)
      if Namespace.exists?(args.first)
        create_namespace(args.first)
      else
        call_method(args, &block)
      end
    end
881029
def set_block_argument_names
      @block_argument_names = if has_block? && element[2].is_a?(Sexp) # HACK: for lambdas
                                element[2].drop(1).map { |argument| argument }
                              end || []
    end
736389
def validate_proxy_args(cls, *args):
        """"""
        supplied_proxies = Counter((not arg for arg in (*args,))).get(False)
        if not supplied_proxies:
            return
        elif supplied_proxies > 1:
            raise RaccoonException("Must specify only one of the following:\n"
                                   "--tor-routing, --proxy-list, --proxy")
723908
def check_class(klass)
      unless klass.method_defined?(name)
        raise NotImplementedErrorCheckError.new(self,
            "method '#{name}' not implemented in #{klass}")
      end
      check_method = klass.instance_method(name)
      if arity and (check_arity = check_method.arity) != arity
        raise ArgumentErrorCheckError.new(self,
              "wrong number of arguments for protocol"\
              " in method '#{name}' (#{check_arity} for #{arity}) of #{klass}")
      end
      if block_expected?
        modul = Utilities.find_method_module(name, klass.ancestors)
        parser = MethodParser.new(modul, name)
        parser.block_arg? or raise BlockCheckError.new(self,
          "expected a block argument for #{klass}")
      end
      arity and wrap_method(klass)
      true
    end
307786
def method_missing(method, *args, &block)
      raise Checky::Exception unless methods.include?("populate_#{method}".to_sym)
      @storage.send("#{method}=", send("populate_#{method}", *args, &block))
      @storage.checky_blocks[method.to_sym] = block if block_given?
    rescue Checky::Exception
      @self_before_instance_eval.send method, *args, &block if @self_before_instance_eval.present?
    end
603065
def method_missing(meth, *args, &block)
      if (po = __proxy_options__) && po.respond_to?(meth.to_s)
        po.send(meth.to_s, *args, &block)
      else
        super
      end
    end
1058397
def arguments
      case self.type
      when :def, :block
        ArgumentsNode.new self.children[1]
      when :defs
        ArgumentsNode.new self.children[2]
      when :send
        self.children[2..-1]
      when :defined?
        self.children
      else
        raise Synvert::Core::MethodNotSupported.new "arguments is not handled for #{self.debug_info}"
      end
    end
656503
def call(method, *args)
      ok, param = call2(method, *args) 
      if ok
        param
      else
        raise param
      end
    end
1123274
def check_arguments(self):
        
        for k, v in self.Parameters.iteritems():
            if self.Parameters[k].isOn():
                if k in self._valid_arguments:
                    if not self._valid_arguments[k](v.Value):
                        error_message = 'Invalid argument (%s) ' % v.Value
                        error_message += 'for parameter %s\n' % k
                        raise InvalidArgumentApplicationError(error_message)
353468
def method_missing(name, *args, &block)
      if args.empty? && !block_given? && @arg_names.include?(name)
        @args[name]
      else
        super
      end
    end
488877
def validate_args_count(expected, got)
      if (expected.is_a?(Numeric) and expected != got) or
         (expected.is_a?(Range) and !(expected === got))
        raise ArgumentError, "wrong number of arguments for '#{name}' (#{got} for #{expected})"
      end
    end
765123
def check_args
      raise MissingArgumentError.new(@name) unless args_full?
      unless @arg_values.empty?
        @args.each do |name, arg|
          if @arg_values.key? name
            arg = [arg] unless arg.is_a? Array
            arg.each do |a|
              unless a =~ @arg_values[name]
                raise UnexpectedArgumentError.new(a)
              end
            end
          end
        end
      end
    end
440043
def method_missing(method, *args, &block)
      helpers.send(method, *args, &block)
    rescue NoMethodError
      super
    end
1365940
function checkArguments () {
    var obj = flag(this, 'object')
      , type = Object.prototype.toString.call(obj);
    this.assert(
        '[object Arguments]' === type
      , 'expected #{this} to be arguments but got ' + type
      , 'expected #{this} to not be arguments'
    );
  }
677761
def method_missing(name, *args, &block)
      return meta[name.to_s] if meta.key?(name.to_s)
      super
    end
392899
def method_missing mtd, *args
      if mtd.to_s.chars.to_a.last == '='
        raise ArgumentError, "Invalid number of arguments (#{args.length} for 1)" if args.length != 1
        attributes[mtd.to_s.slice(0,mtd.to_s.length-1)] = args.first
      else
        raise ArgumentError, "Invalid number of arguments (#{args.length} for 0)" if args.length != 0
        attributes[mtd.to_s]
      end
    end