Skip to content

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