redis / redis-io

Application running http://redis.io

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect element order on CLI output for ZPOPMAX and ZPOPMIN

defterade opened this issue · comments

Shown on website:

redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "3"
2) "three"
redis> 

Expected output:

redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "three"
2) "3"
redis>

Same issue. This would cause a problem when I execute this script:

redis.call('ZADD', 'test', '1.0', 'a', '2.0', 'b')
local values = redis.call('ZPOPMIN', 'test', 2)
redis.call('ZADD', 'test', unpack(values))

I believe that the documentation has been fixed and now provides the correct order of arguments - please confirm.