Skip to content

Commit

Permalink
zrevrange sorts equal-range values by reverse lexical order
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianni Ceccarelli authored and jlavallee committed Feb 4, 2017
1 parent d801253 commit 2c499c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Test/Mock/Redis.pm
Expand Up @@ -1045,7 +1045,7 @@ sub zrevrange {

return map { $withscores ? ( $_, $self->zscore($key, $_) ) : $_ }
( map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
sort { $b->[1] <=> $a->[1] || $b->[0] cmp $a->[0] }
map { [ $_, $self->_stash->{$key}->{$_} ] }
keys %{ $self->_stash->{$key} }
)[$start..$stop]
Expand Down

0 comments on commit 2c499c0

Please sign in to comment.