-
Notifications
You must be signed in to change notification settings - Fork 1k
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
r.keys should retrurn an array #39
Comments
The server changed return type, I fixed that in 1.x branch and Ezra merged. I guess that with 2.0 this was re-inserted. My fault as I did not wrote regression tests in my patch. |
I used redis-rb 2.0.0 against redis 1.2.6. |
Fixed in 2.0.1. |
unfortunately, it's not fixed:
I think this should be ["a b c"], right? |
Even if a key with spaces works for all operations, I think it will never work with the The fix included in 2.0.1 assumes keys don't contain spaces, which is the best we can do at this point. |
bummer. but thanks a lot for the quick reaction. |
You're welcome. |
Hey soveran, skaes: my patch checked if the returned value (from the low level decoding function) was an array or a string. If it's a string, just split it. This is the relevant commit: http://github.com/ezmobius/redis-rb/commit/07579be932511f4fd5598dbbda1f0f154d836c76 I think we should fix this for 2.0.x as well. Cheers, |
antirez: yes, it's already fixed in 2.0.1. The other problem I think has no solution, though. |
Sorry misunderstood the chat. The only fix is switching to Redis 2.0 indeed. Cheers, |
prior to 2.0, r.keys(pattern) returned the matching keys as an array. now it returns a single, blank separated string.
This new behavior breaks our beetle gem. We could work around it, but I consider this as a bug, as keys with embedded blanks seem to be supported by redis.
The text was updated successfully, but these errors were encountered: