# File lib/redis.rb, line 1510
  def zadd(key, *args) #, options
    zadd_options = []
    if args.last.is_a?(Hash)
      options = args.pop

      nx = options[:nx]
      zadd_options << "NX" if nx

      xx = options[:xx]
      zadd_options << "XX" if xx

      ch = options[:ch]
      zadd_options << "CH" if ch

      incr = options[:incr]
      zadd_options << "INCR" if incr
    end

    synchronize do |client|
      if args.size == 1 && args[0].is_a?(Array)
        # Variadic: return float if INCR, integer if !INCR
        client.call([:zadd, key] + zadd_options + args[0], &(incr ? Floatify : nil))
      elsif args.size == 2
        # Single pair: return float if INCR, boolean if !INCR
        client.call([:zadd, key] + zadd_options + args, &(incr ? Floatify : Boolify))
      else
        raise ArgumentError, "wrong number of arguments"
      end
    end
  end