From 83d858f1ad19be90c4256ce697ea4a2d3208942a Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Tue, 12 Jul 2022 21:23:06 -0400 Subject: [PATCH] Remove conditional for caller_locations Kernel#caller_locations was added in ruby 2, and the required ruby version is 2.5 The Rails version check will also always be true since the minimum Rails version is 5.2 --- lib/sprockets/rails/helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/sprockets/rails/helper.rb b/lib/sprockets/rails/helper.rb index f3e9df07..23e34e61 100644 --- a/lib/sprockets/rails/helper.rb +++ b/lib/sprockets/rails/helper.rb @@ -89,8 +89,7 @@ def compute_asset_path(path, options = {}) message << "To bypass the asset pipeline and preserve this behavior,\n" message << "use the `skip_pipeline: true` option.\n" - call_stack = Kernel.respond_to?(:caller_locations) && ::Rails::VERSION::MAJOR >= 5 ? caller_locations : caller - ActiveSupport::Deprecation.warn(message, call_stack) + ActiveSupport::Deprecation.warn(message, caller_locations) end super end