From 55f70ca2fb44ce4a9a348a15de55427835e6c69f Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Thu, 12 Oct 2023 11:03:55 +0100 Subject: [PATCH] Fix redis-activesupport with ActiveSupport 7.1.1 Otherwise you'll see test failures like, eg, ``` NoMethodError: undefined method `present?' for 2:Integer if options[:expires_in].present? && options[:race_condition_ttl].present? && options[:raw].blank? ^^^^^^^^^ /Users/jon/.gem/ruby/p0vc9077im6p4r2hwmjldm9qjdksn06v-ruby-3.1.4/gems/redis-activesupport-5.3.0/lib/active_support/cache/redis_store.rb:82:in `block in write' ``` --- spec/acceptance/stores/active_support_redis_store_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/acceptance/stores/active_support_redis_store_spec.rb b/spec/acceptance/stores/active_support_redis_store_spec.rb index 75e4d68d..a5322118 100644 --- a/spec/acceptance/stores/active_support_redis_store_spec.rb +++ b/spec/acceptance/stores/active_support_redis_store_spec.rb @@ -5,6 +5,9 @@ if defined?(::ActiveSupport::Cache::RedisStore) require_relative "../../support/cache_store_helper" require "timecop" + # redis-activesupport has some undeclared dependencies on ActiveSupport: + require "active_support/core_ext/object/blank" + require "active_support/core_ext/hash/keys" describe "ActiveSupport::Cache::RedisStore as a cache backend" do before do