We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Redis#exists?
1 parent 850ab84 commit 525a93eCopy full SHA for 525a93e
lib/redis.rb
@@ -584,7 +584,9 @@ def _exists(*keys)
584
# @return [Boolean]
585
def exists?(*keys)
586
synchronize do |client|
587
- client.call([:exists, *keys], &Boolify)
+ client.call([:exists, *keys]) do |value|
588
+ value > 0
589
+ end
590
end
591
592
test/lint/value_types.rb
@@ -40,6 +40,10 @@ def test_exists?
40
r.set("{1}foo", "s1")
41
42
assert_equal true, r.exists?("{1}foo")
43
+
44
+ r.set("{1}bar", "s1")
45
46
+ assert_equal true, r.exists?("{1}foo", "{1}bar")
47
48
49
def test_type
0 commit comments