Created
December 11, 2009 15:36
-
-
Save erichocean/254278 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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