lib/active_support/cache.rb in activesupport-6.1.3.2 vs lib/active_support/cache.rb in activesupport-6.1.4

- old
+ new

@@ -56,10 +56,16 @@ # # => returns MyOwnCacheStore.new def lookup_store(store = nil, *parameters) case store when Symbol options = parameters.extract_options! - retrieve_store_class(store).new(*parameters, **options) + # clean this up once Ruby 2.7 support is dropped + # see https://github.com/rails/rails/pull/41522#discussion_r581186602 + if options.empty? + retrieve_store_class(store).new(*parameters) + else + retrieve_store_class(store).new(*parameters, **options) + end when Array lookup_store(*store) when nil ActiveSupport::Cache::MemoryStore.new else