aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-09-04 01:17:38 +0200
committerXavier Noria <fxn@hashref.com>2012-09-04 01:24:09 +0200
commit5388fee718994adabfde20020652d03d67d97048 (patch)
treefdda2bb3b3138ff2de1665c6eac7587820db5cb3 /activesupport
parent70f147db7b8103bc93703188b24f387c16549b5c (diff)
downloadrails-5388fee718994adabfde20020652d03d67d97048.tar.gz
rails-5388fee718994adabfde20020652d03d67d97048.tar.bz2
rails-5388fee718994adabfde20020652d03d67d97048.zip
revised the exception message "Expected #{file_path} to define #{qualified_name}"
Users need to know the ultimate problem here is that AS was trying to autoload a constant and it failed.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/dependencies.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 45c9f0472a..d6bc95a522 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -487,7 +487,7 @@ module ActiveSupport #:nodoc:
raise "Circular dependency detected while autoloading constant #{qualified_name}"
else
require_or_load(expanded)
- raise LoadError, "Expected #{file_path} to define #{qualified_name}" unless from_mod.const_defined?(const_name, false)
+ raise LoadError, "Unable to autoload constant #{qualified_name}, expected #{file_path} to define it" unless from_mod.const_defined?(const_name, false)
return from_mod.const_get(const_name)
end
elsif mod = autoload_module!(from_mod, const_name, qualified_name, path_suffix)