Fix Active Support failure for redis 4.2.0 with Ruby 2.8.0-dev

This commit is contained in:
Ryuta Kamizono 2020-06-10 09:25:03 +09:00
parent 2c5c452d8c
commit 37c19f7ebc
3 changed files with 3 additions and 3 deletions

View File

@ -386,7 +386,7 @@ GEM
ffi (~> 1.0)
rdoc (6.2.1)
redcarpet (3.2.3)
redis (4.1.3)
redis (4.2.0)
redis-namespace (1.7.0)
redis (>= 3.0.4)
regexp_parser (1.6.0)

View File

@ -398,7 +398,7 @@ module ActiveSupport
modifiers[:nx] = unless_exist
modifiers[:px] = (1000 * expires_in.to_f).ceil if expires_in
redis.with { |c| c.set key, serialized_entry, modifiers }
redis.with { |c| c.set key, serialized_entry, **modifiers }
else
redis.with { |c| c.set key, serialized_entry }
end

View File

@ -290,7 +290,7 @@ module ActiveSupport::Cache::RedisCacheStoreTests
@cache.redis.set("fu", "baz")
@cache.clear
assert_not @cache.exist?("foo")
assert @cache.redis.exists("fu")
assert @cache.redis.exists?("fu")
end
test "clear all cache key with Redis::Distributed" do