nrk / redis-lua

A Lua client library for the redis key value storage system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZRANGE ... WITHSCORES: convert scores to numbers

catwell opened this issue · comments

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?

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!