From 62aa0603b79965c4f48711bc2adf033551be2439 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Fri, 3 Feb 2006 22:36:44 +0000 Subject: Don't allow Reloadable to be included into Modules git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/reloadable.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/reloadable.rb b/activesupport/lib/active_support/reloadable.rb index 179e04a0fe..c71b2fa4bd 100644 --- a/activesupport/lib/active_support/reloadable.rb +++ b/activesupport/lib/active_support/reloadable.rb @@ -3,7 +3,9 @@ module Reloadable class << self def included(base) #nodoc: - if base.is_a?(Class) && ! base.respond_to?(:reloadable?) + raise TypeError, "Only Classes can be Reloadable!" unless base.is_a? Class + + unless base.respond_to?(:reloadable?) class << base define_method(:reloadable?) { true } end -- cgit v1.2.3