aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/class/delegating_attributes.rb2
-rw-r--r--activesupport/lib/active_support/dependencies.rb1
-rw-r--r--activesupport/lib/active_support/json.rb2
-rw-r--r--activesupport/lib/active_support/testing/deprecation.rb18
4 files changed, 14 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
index da798c67e7..b0784d8416 100644
--- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/blank'
+
class Class
def superclass_delegating_reader(*names)
class_name_to_stop_searching_on = superclass.name.blank? ? "Object" : superclass.name
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 41b7e00c0c..1804c14618 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -1,4 +1,5 @@
require 'set'
+require 'thread'
require 'active_support/inflector'
require 'active_support/core_ext/name_error'
require 'active_support/core_ext/object/blank'
diff --git a/activesupport/lib/active_support/json.rb b/activesupport/lib/active_support/json.rb
index 2bdb4a7b11..91f19f8a70 100644
--- a/activesupport/lib/active_support/json.rb
+++ b/activesupport/lib/active_support/json.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/module/attribute_accessors'
+
module ActiveSupport
# If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format.
mattr_accessor :use_standard_json_time_format
diff --git a/activesupport/lib/active_support/testing/deprecation.rb b/activesupport/lib/active_support/testing/deprecation.rb
index e9220605bd..0135185a47 100644
--- a/activesupport/lib/active_support/testing/deprecation.rb
+++ b/activesupport/lib/active_support/testing/deprecation.rb
@@ -1,3 +1,5 @@
+require 'active_support/deprecation'
+
module ActiveSupport
module Testing
module Deprecation #:nodoc:
@@ -35,21 +37,19 @@ end
begin
require 'test/unit/error'
-
+rescue LoadError
+ # Using miniunit, ignore.
+else
module Test
module Unit
- class Error # :nodoc:
+ class Error #:nodoc:
# Silence warnings when reporting test errors.
def message_with_silenced_deprecation
- ActiveSupport::Deprecation.silence do
- message_without_silenced_deprecation
- end
+ ActiveSupport::Deprecation.silence { message_without_silenced_deprecation }
end
-
- alias_method_chain :message, :silenced_deprecation
+ alias_method :message_without_silenced_deprecation, :message
+ alias_method :message, :message_with_silenced_deprecation
end
end
end
-rescue LoadError
- # Using miniunit, ignore.
end