aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
authorYehuda Katz <yehudakatz@YK.local>2010-02-14 12:13:37 -0800
committerYehuda Katz <yehudakatz@YK.local>2010-02-14 12:13:37 -0800
commit38eb2f145432429d866ab62f796dd7055d1c524a (patch)
treefe6f24bad2c85f40db93bae649ca24fc97ee5e00 /activesupport/lib/active_support/dependencies.rb
parent98a5bf8ff219f796e6db2d8d8b21dd114be47965 (diff)
downloadrails-38eb2f145432429d866ab62f796dd7055d1c524a.tar.gz
rails-38eb2f145432429d866ab62f796dd7055d1c524a.tar.bz2
rails-38eb2f145432429d866ab62f796dd7055d1c524a.zip
Right.
Diffstat (limited to 'activesupport/lib/active_support/dependencies.rb')
-rw-r--r--activesupport/lib/active_support/dependencies.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 22b5e434c8..87d56eb17e 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -177,7 +177,10 @@ module ActiveSupport #:nodoc:
end
def require_dependency(file_name, message = "No such file to load -- %s")
- raise ArgumentError, "the file name must be a String -- you passed #{file_name.inspect}"
+ unless file_name.is_a?(String)
+ raise ArgumentError, "the file name must be a String -- you passed #{file_name.inspect}"
+ end
+
Dependencies.depend_on(file_name, false, message)
end