Skip to content

Commit 7050311

Browse files
committed
Allow spop to return multiple members
1 parent bdd679a commit 7050311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/redis/set.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def add(value)
2727
end
2828

2929
# Remove and return a random member. Redis: SPOP
30-
def pop
31-
unmarshal redis.spop(key)
30+
def pop(count = nil)
31+
unmarshal redis.spop(key, count)
3232
end
3333

3434
# return a random member. Redis: SRANDMEMBER

0 commit comments

Comments
 (0)