aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/dependencies.rb')
-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 26466097e8..9681af6dff 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -196,7 +196,7 @@ class Module #:nodoc:
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