aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz <yehudakatz@YK.local>2010-02-14 11:55:01 -0800
committerYehuda Katz <yehudakatz@YK.local>2010-02-14 11:56:21 -0800
commit411c15ed5220cb07cfb1989d32be956f94a7478f (patch)
tree93897380636bcfdd31ce8949ee6df80125e7991e
parent8e4363de72c0829c68d38f636b7fcefce6a5759a (diff)
downloadrails-411c15ed5220cb07cfb1989d32be956f94a7478f.tar.gz
rails-411c15ed5220cb07cfb1989d32be956f94a7478f.tar.bz2
rails-411c15ed5220cb07cfb1989d32be956f94a7478f.zip
require Strings, not Symbols
-rw-r--r--activesupport/lib/active_support/dependencies.rb1
-rw-r--r--railties/lib/rails/application/metal_loader.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index ee7566f335..22b5e434c8 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -177,6 +177,7 @@ 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}"
Dependencies.depend_on(file_name, false, message)
end
diff --git a/railties/lib/rails/application/metal_loader.rb b/railties/lib/rails/application/metal_loader.rb
index c0f2e4f948..2a43fa7892 100644
--- a/railties/lib/rails/application/metal_loader.rb
+++ b/railties/lib/rails/application/metal_loader.rb
@@ -34,7 +34,7 @@ module Rails
Dir.glob("#{path}/**/*.rb").sort.each do |metal_path|
metal = metal_path.sub(matcher, '\1').to_sym
next unless list.include?(metal) || list.include?(:all)
- require_dependency metal
+ require_dependency metal.to_s
metals << metal
end
end