From 65abbb349fb16a958c9d2aa17d9bf52575651972 Mon Sep 17 00:00:00 2001 From: Emiliano Mancuso Date: Mon, 7 Sep 2020 16:19:27 +0100 Subject: [PATCH] Remove warning ``` `Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer = true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0. ``` --- lib/ldclient-rb/impl/integrations/redis_impl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldclient-rb/impl/integrations/redis_impl.rb b/lib/ldclient-rb/impl/integrations/redis_impl.rb index 876f4240..8f6ebb10 100644 --- a/lib/ldclient-rb/impl/integrations/redis_impl.rb +++ b/lib/ldclient-rb/impl/integrations/redis_impl.rb @@ -115,7 +115,7 @@ def upsert_internal(kind, new_item) end def initialized_internal? - with_connection { |redis| redis.exists(inited_key) } + with_connection { |redis| redis.exists?(inited_key) } end def stop