diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-08-01 18:43:25 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-08-01 18:51:51 +0900 |
commit | 530f7805ed5790af1d472a041bc74089dc183f47 (patch) | |
tree | 9c897d7b77cd00127f8a51685506db1e5a4d00c2 /activesupport | |
parent | 03018cb79be301fb40a57c9ac92a392b1eb8ee61 (diff) | |
download | rails-530f7805ed5790af1d472a041bc74089dc183f47.tar.gz rails-530f7805ed5790af1d472a041bc74089dc183f47.tar.bz2 rails-530f7805ed5790af1d472a041bc74089dc183f47.zip |
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.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/notifications/fanout.rb | 1 |
2 files changed, 2 insertions, 0 deletions
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 |