lib/active_support/dependencies.rb in activesupport-1.2.3 vs lib/active_support/dependencies.rb in activesupport-1.2.4

- old
+ new

@@ -194,10 +194,10 @@ require_dependency(file_name) raise NameError.new("uninitialized constant #{class_id}") unless Object.const_defined?(class_id) return Object.const_get(class_id) rescue MissingSourceFile => e # Convert the exception to a NameError only if the file we are looking for is the missing one. - raise unless e.path == "#{file_name}.rb" + raise unless e.is_missing? file_name raise NameError.new("uninitialized constant #{class_id}").copy_blame!(e) end end end