Skip to content

Commit 9da7435

Browse files
committed
Avoid Fixnum deprecation warning on Ruby trunk
1 parent 27759c0 commit 9da7435

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/redis/client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,12 @@ def _parse_options(options)
451451
case options[:tcp_keepalive]
452452
when Hash
453453
[:time, :intvl, :probes].each do |key|
454-
unless options[:tcp_keepalive][key].is_a?(Fixnum)
455-
raise "Expected the #{key.inspect} key in :tcp_keepalive to be a Fixnum"
454+
unless options[:tcp_keepalive][key].is_a?(Integer)
455+
raise "Expected the #{key.inspect} key in :tcp_keepalive to be an Integer"
456456
end
457457
end
458458

459-
when Fixnum
459+
when Integer
460460
if options[:tcp_keepalive] >= 60
461461
options[:tcp_keepalive] = {:time => options[:tcp_keepalive] - 20, :intvl => 10, :probes => 2}
462462

test/remote_server_control_commands_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def test_object
101101
assert_equal 1, r.object(:refcount, "list")
102102
encoding = r.object(:encoding, "list")
103103
assert "ziplist" == encoding || "quicklist" == encoding, "Wrong encoding for list"
104-
assert r.object(:idletime, "list").kind_of?(Fixnum)
104+
assert r.object(:idletime, "list").kind_of?(Integer)
105105
end
106106

107107
def test_sync

0 commit comments

Comments
 (0)