aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support.rb6
-rw-r--r--activesupport/lib/active_support/core.rb7
-rw-r--r--activesupport/lib/active_support/core/all.rb4
-rw-r--r--activesupport/lib/active_support/core/time.rb4
-rw-r--r--activesupport/lib/active_support/core/time/autoload.rb4
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb13
6 files changed, 25 insertions, 13 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index 7ebb3c48e0..d049740002 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -23,7 +23,7 @@
module ActiveSupport
def self.load_all!
- [Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom, TimeWithZone]
+ [Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom] + Core.load_all!
end
autoload :BacktraceCleaner, 'active_support/backtrace_cleaner'
@@ -46,11 +46,11 @@ module ActiveSupport
autoload :Rescuable, 'active_support/rescuable'
autoload :SecureRandom, 'active_support/secure_random'
autoload :StringInquirer, 'active_support/string_inquirer'
- autoload :TimeWithZone, 'active_support/time_with_zone'
- autoload :TimeZone, 'active_support/values/time_zone'
autoload :XmlMini, 'active_support/xml_mini'
end
+require 'active_support/core/all'
+
require 'active_support/vendor'
require 'active_support/core_ext'
require 'active_support/dependencies'
diff --git a/activesupport/lib/active_support/core.rb b/activesupport/lib/active_support/core.rb
new file mode 100644
index 0000000000..ad8db94941
--- /dev/null
+++ b/activesupport/lib/active_support/core.rb
@@ -0,0 +1,7 @@
+module ActiveSupport
+ module Core
+ def self.load_all!
+ [TimeWithZone]
+ end
+ end
+end
diff --git a/activesupport/lib/active_support/core/all.rb b/activesupport/lib/active_support/core/all.rb
new file mode 100644
index 0000000000..06440add20
--- /dev/null
+++ b/activesupport/lib/active_support/core/all.rb
@@ -0,0 +1,4 @@
+require 'active_support/core'
+Dir["#{File.dirname(__FILE__)}/core/*.rb"].sort.each do |path|
+ require "active_support/core/#{File.basename(path, '.rb')}"
+end
diff --git a/activesupport/lib/active_support/core/time.rb b/activesupport/lib/active_support/core/time.rb
new file mode 100644
index 0000000000..71565ac6c2
--- /dev/null
+++ b/activesupport/lib/active_support/core/time.rb
@@ -0,0 +1,4 @@
+require 'active_support/core/time/autoload'
+require 'active_support/core_ext/time'
+require 'active_support/core_ext/date'
+require 'active_support/core_ext/datetime'
diff --git a/activesupport/lib/active_support/core/time/autoload.rb b/activesupport/lib/active_support/core/time/autoload.rb
new file mode 100644
index 0000000000..6970c398c3
--- /dev/null
+++ b/activesupport/lib/active_support/core/time/autoload.rb
@@ -0,0 +1,4 @@
+module ActiveSupport
+ autoload :TimeWithZone, 'active_support/time_with_zone'
+ autoload :TimeZone, 'active_support/values/time_zone'
+end
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 531fdb9d31..bfec0711ad 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -1,13 +1,6 @@
-require 'active_support/core_ext/time/publicize_conversion_methods'
-require 'active_support/core_ext/time/acts_like'
-require 'active_support/core_ext/time/calculations'
-require 'active_support/core_ext/time/zones'
-
-require 'active_support/core_ext/date/acts_like'
-
-require 'active_support/core_ext/date_time/acts_like'
-require 'active_support/core_ext/date_time/calculations'
-require 'active_support/core_ext/date_time/zones'
+require 'active_support/core_ext/time'
+require 'active_support/core_ext/date'
+require 'active_support/core_ext/date_time'
# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following:
#