redis / redis-rb

A Ruby client library for Redis
MIT License
3.97k stars 1.03k forks source link

✨ Add ZINTERCARD #1200

Closed JerrodCarpenter closed 1 year ago

JerrodCarpenter commented 1 year ago
irb(main):001:0> redis = Redis.new(url: "redis://localhost:6379/2")
=> #<Redis client v5.0.6 for redis://localhost:6379/2>
irb(main):002:0> redis.zadd("zseta", 2, "two")
=> true
irb(main):003:0> redis.zadd("zsetb", 3, "three")
=> true
irb(main):004:0> redis.zinter("zseta", "zsetb")
=> []
irb(main):005:0> redis.zintercard("zseta", "zsetb")
=> 0
irb(main):006:0> redis.zadd("zsetb", 2, "two")
=> true
irb(main):007:0> redis.zintercard("zseta", "zsetb")
=> 1
irb(main):005:0> redis.zintercard("zseta", "zsetb", "zsetc")
=> 0
JerrodCarpenter commented 1 year ago

Is the test failing because I have a key name clash in my test?