lib/active_support/dependencies.rb in activesupport-4.0.0 vs lib/active_support/dependencies.rb in activesupport-4.0.1.rc1

- old
+ new

@@ -6,10 +6,11 @@ require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/module/introspection' require 'active_support/core_ext/module/anonymous' require 'active_support/core_ext/module/qualified_const' require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/load_error' require 'active_support/core_ext/name_error' require 'active_support/core_ext/string/starts_ends_with' require 'active_support/inflector' @@ -211,11 +212,11 @@ Dependencies.new_constants_in(Object) { yield } else yield end rescue Exception => exception # errors from loading file - exception.blame_file! file + exception.blame_file! file if exception.respond_to? :blame_file! raise end def load(file, wrap = false) result = false @@ -457,10 +458,10 @@ expanded.sub!(/\.rb\z/, '') if loaded.include?(expanded) raise "Circular dependency detected while autoloading constant #{qualified_name}" else - require_or_load(expanded) + require_or_load(expanded, qualified_name) 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) return mod