From 7509e29e30409eace6ac16334775d15cf296a123 Mon Sep 17 00:00:00 2001 From: Mike Lothian Date: Wed, 2 Aug 2017 13:42:54 +0100 Subject: [PATCH] Avoid Fixnum deprecation warning on Ruby trunk Fix taken from https://github.com/redis/redis-rb/commit/9da74357491a77e128474aa929054fa402fc211d commit 9da74357491a77e128474aa929054fa402fc211d Author: utilum Date: Sat Dec 17 03:11:04 2016 +0100 --- lib/vendor/redis/lib/redis/client.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vendor/redis/lib/redis/client.rb b/lib/vendor/redis/lib/redis/client.rb index c867f633b..31be2de33 100644 --- a/lib/vendor/redis/lib/redis/client.rb +++ b/lib/vendor/redis/lib/redis/client.rb @@ -451,12 +451,12 @@ class Redis case options[:tcp_keepalive] when Hash [:time, :intvl, :probes].each do |key| - unless options[:tcp_keepalive][key].is_a?(Fixnum) - raise "Expected the #{key.inspect} key in :tcp_keepalive to be a Fixnum" + unless options[:tcp_keepalive][key].is_a?(Integer) + raise "Expected the #{key.inspect} key in :tcp_keepalive to be an Integer" end end - when Fixnum + when Integer if options[:tcp_keepalive] >= 60 options[:tcp_keepalive] = {:time => options[:tcp_keepalive] - 20, :intvl => 10, :probes => 2} -- GitLab