Skip to content

Commit f7af6e0

Browse files
committed
Fix scores by padding and capping index to 6 digits
1 parent a98f260 commit f7af6e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kredis/types/unique_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def insert(elements, prepending: false)
4646
end
4747

4848
def generate_score(index, negative:)
49-
score = Integer([ *basis_score_components, index ].join, 10)
49+
score = Integer([ *basis_score_components, index.to_s.rjust(6, "0") ].join, 10)
5050
negative ? -score : score
5151
end
5252

0 commit comments

Comments
 (0)