Should rename keys to ids for consistency
matrush opened this issue · comments
Chaoshuai Lü commented
Actually for this issue #32, there are two places need to be fixed in the book, and the commit 469405d just fixed one of them.
The keys in below code:
keys = redis.lrange('newusers', 0, 10)
redis.mget(*keys.map {|u| "users:#{u}"})
should be renamed for consistency. (as well a minor range issue: 10 to 9)
ids = redis.lrange('newusers', 0, 9)
redis.mget(*ids.map {|u| "users:#{u}"})
There is also a minor error in this sentence:
...anything you want sorted by an some integer...
Karl Seguin commented
thank you 👍