Removed ActiveSupport#load_all!

This is no longer used and actually raises an error when trying to load
`ActiveSupport::Dependencies`. I removed the related code and added the
`Dependencies` module to the autoload list.
This commit is contained in:
Pan Thomakos 2012-03-18 11:24:04 -07:00
parent d3bbb23b2f
commit 0f8f99b989
2 changed files with 1 additions and 18 deletions

View File

@ -22,20 +22,6 @@
#++ #++
require 'securerandom' require 'securerandom'
module ActiveSupport
class << self
attr_accessor :load_all_hooks
def on_load_all(&hook) load_all_hooks << hook end
def load_all!; load_all_hooks.each { |hook| hook.call } end
end
self.load_all_hooks = []
on_load_all do
[Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte]
end
end
require "active_support/dependencies/autoload" require "active_support/dependencies/autoload"
require "active_support/version" require "active_support/version"
require "active_support/logger" require "active_support/logger"
@ -44,6 +30,7 @@ module ActiveSupport
extend ActiveSupport::Autoload extend ActiveSupport::Autoload
autoload :Concern autoload :Concern
autoload :Dependencies
autoload :DescendantsTracker autoload :DescendantsTracker
autoload :FileUpdateChecker autoload :FileUpdateChecker
autoload :LogSubscriber autoload :LogSubscriber

View File

@ -4,10 +4,6 @@ module ActiveSupport
autoload :Duration, 'active_support/duration' autoload :Duration, 'active_support/duration'
autoload :TimeWithZone, 'active_support/time_with_zone' autoload :TimeWithZone, 'active_support/time_with_zone'
autoload :TimeZone, 'active_support/values/time_zone' autoload :TimeZone, 'active_support/values/time_zone'
on_load_all do
[Duration, TimeWithZone, TimeZone]
end
end end
require 'date' require 'date'