Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Modify objects to play nicely with Redis#pipelined #48

Merged
merged 1 commit into from

2 participants

Roy Liu Nate Wiger
Roy Liu

When under Redis#pipelined, some calls return nil values, which then cause errors in Redis objects. In particular, HashKeys#all gives a NoMethodError on nil. I've modified that method to properly handle the nil case, but there could be other places in which the change is necessary.

Please ignore this pull request if Redis objects do not support pipelining, or you feel that the Redis driver itself should return dummy, non-nil values.

Nate Wiger nateware merged commit 161b738 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 20, 2011
  1. Roy Liu
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/redis/hash_key.rb
2  lib/redis/hash_key.rb
View
@@ -70,7 +70,7 @@ def values
# Retrieve the entire hash. Redis: HGETALL
def all
- h = redis.hgetall(key)
+ h = redis.hgetall(key) || {}
h.each { |k,v| h[k] = from_redis(v, options[:marshal_keys][k]) }
h
end
Something went wrong with that request. Please try again.