nrk / redis-lua

A Lua client library for the redis key value storage system.
MIT License
731 stars 239 forks source link

ZRANGE ... WITHSCORES: convert scores to numbers #25

Closed catwell closed 10 years ago

catwell commented 11 years ago

Currently ZRANGE ... WITHSCORES returns scores as strings. Since Redis scores are always float, would it not be a good idea to call tonumber() on them before returning them to the user?

nrk commented 10 years ago

Makes sense, I also updated ZSCORE to return the score as number for consistency with this change. I pushed those changes into master but I won't backport them to v2.0 as I think it can be considered a breaking change to a certain extent. Thanks!