Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add LMPOP #1195

Merged
merged 1 commit into from
May 30, 2023
Merged

✨ Add LMPOP #1195

merged 1 commit into from
May 30, 2023

Conversation

JerrodCarpenter
Copy link
Contributor

@JerrodCarpenter JerrodCarpenter commented May 30, 2023

  redis-rb git:(lmpop) ./bin/console 
irb(main):001:0> redis = Redis.new(url: "redis://localhost:6379/2")
=> #<Redis client v5.0.6 for redis://localhost:6379/2>
irb(main):002:0> redis.rpush("list", [6, 1, 2, 3, 4, 5, 6])
=> 8
irb(main):003:0> redis.lmpop("list")
=> ["list", ["6"]]
irb(main):004:0> redis.lmpop("list", modifier: "RIGHT")
=> ["list", ["6"]]
irb(main):005:0> redis.lmpop("list", modifier: "RIGHT", count: 2)
=> ["list", ["5", "4"]]

@byroot byroot merged commit fde7873 into redis:master May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants