diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-14 00:25:59 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-14 00:25:59 +0000 |
commit | e6941149abbee39dbbe9898b0dc45e95046f7a70 (patch) | |
tree | 0a26f30790345929915540db87dc0aac394f4f50 /activesupport/lib | |
parent | f7c371dff8021de8e2389580bb96b0cfdca3c9ec (diff) | |
download | rails-e6941149abbee39dbbe9898b0dc45e95046f7a70.tar.gz rails-e6941149abbee39dbbe9898b0dc45e95046f7a70.tar.bz2 rails-e6941149abbee39dbbe9898b0dc45e95046f7a70.zip |
Deprecation: removed Reloadable.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/reloadable.rb | 60 |
2 files changed, 0 insertions, 61 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index 668bb6e228..9eec6f3b38 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -31,7 +31,6 @@ require 'active_support/inflector' require 'active_support/core_ext' require 'active_support/clean_logger' require 'active_support/dependencies' -require 'active_support/reloadable' require 'active_support/deprecation' require 'active_support/ordered_options' diff --git a/activesupport/lib/active_support/reloadable.rb b/activesupport/lib/active_support/reloadable.rb deleted file mode 100644 index 084bda1ee2..0000000000 --- a/activesupport/lib/active_support/reloadable.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'active_support/deprecation' - -# A deprecated mechanism to mark a class reloadable. -# -# Deprecated as of Rails 1.2. -# All autoloaded objects are now unloaded. -module Reloadable #:nodoc: - class << self - def included(base) #nodoc: - unless base.ancestors.include?(Reloadable::Subclasses) # Avoid double warning - ActiveSupport::Deprecation.warn "Reloadable has been deprecated and has no effect.", caller - end - - raise TypeError, "Only Classes can be Reloadable!" unless base.is_a? Class - - unless base.respond_to?(:reloadable?) - class << base - define_method(:reloadable?) do - ActiveSupport::Deprecation.warn "Reloadable has been deprecated and reloadable? has no effect", caller - true - end - end - end - end - - def reloadable_classes - ActiveSupport::Deprecation.silence do - included_in_classes.select { |klass| klass.reloadable? } - end - end - deprecate :reloadable_classes - end - - # Captures the common pattern where a base class should not be reloaded, - # but its subclasses should be. - # - # Deprecated as of Rails 1.2. - # All autoloaded objects are now unloaded. - module Subclasses #:nodoc: - def self.included(base) #nodoc: - base.send :include, Reloadable - ActiveSupport::Deprecation.warn "Reloadable::Subclasses has been deprecated and has no effect.", caller - (class << base; self; end).send(:define_method, :reloadable?) do - ActiveSupport::Deprecation.warn "Reloadable has been deprecated and reloadable? has no effect", caller - base != self - end - end - end - - module Deprecated #:nodoc: - def self.included(base) - class << base - define_method(:reloadable?) do - ActiveSupport::Deprecation.warn "Reloadable has been deprecated and reloadable? has no effect", caller - true # This might not have the desired effect, as AR::B.reloadable? => true. - end - end - end - end -end
\ No newline at end of file |