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. --- activemodel/lib/active_model/type/float.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/type/float.rb b/activemodel/lib/active_model/type/float.rb index 36c7a5103c..435e39b2c9 100644 --- a/activemodel/lib/active_model/type/float.rb +++ b/activemodel/lib/active_model/type/float.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "active_support/core_ext/object/try" + module ActiveModel module Type class Float < Value # :nodoc: -- cgit v1.2.3