diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 5 |
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 |