karlseguin/the-little-redis-book — pull request #32 by wzup (2013-08-04 21:36:06+00:00)
Title: LRANGE returns values, not keys

An example in Lists section:
https://github.com/kondratovich/the-little-redis-book/blob/master/ru/redis.md#%D0%A1%D0%BF%D0%B8%D1%81%D0%BA%D0%B8-lists
Why variable name is `keys`? LRANGE returns values, not keys.
```
keys = redis.lrange('newusers', 0, 10)
redis.mget(*keys.map {|u| "users:#{u}"})
```
LRANGE returns values, not keys:
```
redis 127.0.0.1:6379> RPUSH m foo
(integer) 1
redis 127.0.0.1:6379> RPUSH m bar
(integer) 2
redis 127.0.0.1:6379> LRANGE m 0 10
1) "foo"
2) "bar"
```
This hugely misinforms because you're expecting keys `0, 1, ... n` but in fact get values.