module Redis::Commands::Lists

def _bpop(cmd, args, &blk)

def _bpop(cmd, args, &blk)
  timeout = if args.last.is_a?(Hash)
    options = args.pop
    options[:timeout]
  end
  timeout ||= 0
  unless timeout.is_a?(Integer) || timeout.is_a?(Float)
    raise ArgumentError, "timeout must be an Integer or Float, got: #{timeout.class}"
  end
  args.flatten!(1)
  command = [cmd].concat(args)
  command << timeout
  send_blocking_command(command, timeout, &blk)
end