class Redis

def hgetall(key)

Get all the fields and values in a hash.
def hgetall(key)
  synchronize do
    reply = @client.call(:hgetall, key)
    if reply.kind_of?(Array)
      Hash[*reply]
    else
      reply
    end
  end
end