From de77bca9c534e25d20f72cf0eef0973da24381ba Mon Sep 17 00:00:00 2001 From: Junichi Sato <22004610+sato11@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:14:35 +0900 Subject: [PATCH] Remove workaround for Ruby 2.7 at ActiveSupport::Cache#lookup_store Since the minimum required version is now 3.1, this can be got rid of like the comment commands. --- activesupport/lib/active_support/cache.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 2d4d10664957a..c586f3fe8c849 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -86,13 +86,7 @@ def lookup_store(store = nil, *parameters) case store when Symbol options = parameters.extract_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 + retrieve_store_class(store).new(*parameters, **options) when Array lookup_store(*store) when nil