redis/redis-io

Incorrect element order on CLI output for ZPOPMAX and ZPOPMIN

defterade opened this issue · 2 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.