From 530f7805ed5790af1d472a041bc74089dc183f47 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 1 Aug 2019 18:43:25 +0900 Subject: It may be better to explicitly require 'object/try' where we call `try` In most cases it works now without explicit require because it's accidentally required through active_support/core_ext/date_and_time/calculations.rb where we still call `try`, but that would stop working if we changed the Calculations implementation and remove the require call there. --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 1 + activesupport/lib/active_support/notifications/fanout.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 5b48254646..dd021410a9 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -5,6 +5,7 @@ require "active_support/time" require "active_support/core_ext/object/blank" require "active_support/core_ext/object/to_param" require "active_support/core_ext/object/to_query" +require "active_support/core_ext/object/try" require "active_support/core_ext/array/wrap" require "active_support/core_ext/hash/reverse_merge" require "active_support/core_ext/string/inflections" diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index dda71b880e..b0f30d2995 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -3,6 +3,7 @@ require "mutex_m" require "concurrent/map" require "set" +require "active_support/core_ext/object/try" module ActiveSupport module Notifications -- cgit v1.2.3