Skip to content

Commit a12add4

Browse files
committed
Refactored to remain closer to original method
1 parent 75e479a commit a12add4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/redis.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,12 @@ def sort(key, options = {})
525525
synchronize do |client|
526526
client.call([:sort, key] + args) do |reply|
527527
if get.size > 1 && !store
528-
return reply.each_slice(get.size).to_a
528+
if reply
529+
reply.each_slice(get.size).to_a
530+
end
531+
else
532+
reply
529533
end
530-
531-
reply
532534
end
533535
end
534536
end

0 commit comments

Comments
 (0)