Project

General

Profile

Actions

Refactor #35717

closed

use caller_locations when emiting deprecation warnings

Added by Evgeni Golov about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Current code emits a warning when trying to emit a deprecation warning:

ActiveSupport::DeprecationException: DEPRECATION WARNING: Please pass `caller_locations` to the deprecation API (called from deprecation_warning at foreman/app/services/foreman/deprecation.rb:6)
caller_locations was added in Ruby 2.0, so uh, it's safe to use by now ;-)

The above warning comes from Rails at https://github.com/rails/rails/blob/6-1-stable/activesupport/lib/active_support/deprecation/reporting.rb#L138 - and has been there since Rails 5, no idea why we stumble only now over it.

Actions

Also available in: Atom PDF