Skip to content

Commit

Permalink
Address Rails.deprecator
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahchen6 committed Nov 13, 2024
1 parent d182fbd commit abbae8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/datadog/tracing/contrib/rails/support/deprecation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def raise_on_rails_deprecation!
# In Rails 7.1 calling ActiveSupport::Deprecation.behavior= is deprecated
if defined?(Rails) && Rails.gem_version >= Gem::Version.new(7.1)
Rails.deprecator.behavior = :raise
elsif defined?(Rails) && RUBY_VERSION.start_with?('3.4.')
Rails.application.deprecators.behavior = :raise
else
ActiveSupport::Deprecation.behavior = :raise
end
Expand Down

0 comments on commit abbae8c

Please sign in to comment.