Skip to content

Commit 05e40aa

Browse files
committed
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
1 parent 11a0387 commit 05e40aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/sprockets/rails/helper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ def compute_asset_path(path, options = {})
8989
message << "To bypass the asset pipeline and preserve this behavior,\n"
9090
message << "use the `skip_pipeline: true` option.\n"
9191

92-
call_stack = Kernel.respond_to?(:caller_locations) && ::Rails::VERSION::MAJOR >= 5 ? caller_locations : caller
93-
ActiveSupport::Deprecation.warn(message, call_stack)
92+
ActiveSupport::Deprecation.warn(message, caller_locations)
9493
end
9594
super
9695
end

0 commit comments

Comments
 (0)