Skip to content

Commit

Permalink
Only use caller_locations in Rails 5
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Aug 31, 2017
1 parent 3a4fe65 commit df46170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sprockets/rails/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,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) ? caller_locations : caller
call_stack = Kernel.respond_to?(:caller_locations) && ::Rails::VERSION::MAJOR >= 5 ? caller_locations : caller
ActiveSupport::Deprecation.warn(message, call_stack)
end
super
Expand Down

0 comments on commit df46170

Please sign in to comment.