Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created December 11, 2009 15:36
Show Gist options
  • Save erichocean/254278 to your computer and use it in GitHub Desktop.
Save erichocean/254278 to your computer and use it in GitHub Desktop.
r = Redis.new(opts)
r.lpush("srckey","bar")
r.rpoplpush("srckey","newkey")
# srckey is now an empty list
r = Redis.new(opts)
puts r.del("newkey")
# newkey no longer exists
puts r.rpoplpush("srckey","newkey").inspect
The buggy output is:
1
1
The expected output us:
1
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment