Permalink
Browse files

zscore converts its key to a string

  • Loading branch information...
1 parent e90cc70 commit 2fe3572ecd1d811e5acd483110cfa2aa7fe55eb2 @jredville jredville committed Feb 20, 2012
Showing with 5 additions and 1 deletion.
  1. +1 −1 lib/redis/connection/memory.rb
  2. +4 −0 spec/sorted_sets_spec.rb
@@ -718,7 +718,7 @@ def zcard(key)
def zscore(key, value)
fail_unless_zset(key)
- @data[key] && @data[key][value]
+ @data[key] && @data[key][value.to_s]
end
def zcount(key, min, max)
View
@@ -42,6 +42,10 @@ module FakeRedis
@client.zscore("key", "val1").should == 3
end
+ it "should convert the key to a string for zscore" do
+ @client.zadd("key", 1, 1)
+ @client.zscore("key", 1).should == 1
+ end
#it "should intersect multiple sorted sets and store the resulting sorted set in a new key"
it "should return a range of members in a sorted set, by index" do

0 comments on commit 2fe3572

Please sign in to comment.