lib/active_support.rb in activesupport-7.1.5 vs lib/active_support.rb in activesupport-7.2.0.beta1

- old
+ new

@@ -61,10 +61,11 @@ autoload :Benchmarkable autoload :Cache autoload :Callbacks autoload :Configurable autoload :Deprecation + autoload :Delegation autoload :Digest autoload :ExecutionContext autoload :Gzip autoload :Inflector autoload :JSON @@ -108,20 +109,18 @@ def self.cache_format_version=(value) Cache.format_version = value end def self.to_time_preserves_timezone - DateAndTime::Compatibility.preserve_timezone + ActiveSupport.deprecator.warn( + "`config.active_support.to_time_preserves_timezone` has been deprecated and will be removed in Rails 7.3." + ) end def self.to_time_preserves_timezone=(value) - unless value - ActiveSupport.deprecator.warn( - "Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 7.2." - ) - end - - DateAndTime::Compatibility.preserve_timezone = value + ActiveSupport.deprecator.warn( + "`config.active_support.to_time_preserves_timezone` has been deprecated and will be removed in Rails 7.3." + ) end def self.utc_to_local_returns_utc_offset_times DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times end