Skip to content

Commit 9d2e37b

Browse files
authored
Merge pull request #247 from evanpaul/master
Allow spop to return multiple members
2 parents e73312d + 7050311 commit 9d2e37b

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
@@ -20,8 +20,8 @@ def add(value)
2020
end
2121

2222
# Remove and return a random member. Redis: SPOP
23-
def pop
24-
unmarshal redis.spop(key)
23+
def pop(count = nil)
24+
unmarshal redis.spop(key, count)
2525
end
2626

2727
# return a random member. Redis: SRANDMEMBER

0 commit comments

Comments
 (0)