diff options
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 2d7aa7e1e6..9c4412c28c 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -442,7 +442,7 @@ module ActiveSupport #:nodoc: qualified_name = qualified_name_for from_mod, const_name path_suffix = qualified_name.underscore - trace = caller.reject {|l| l =~ %r{#{__FILE__}}} + trace = caller.reject {|l| l =~ %r{#{Regexp.escape(__FILE__)}}} name_error = NameError.new("uninitialized constant #{qualified_name}") name_error.set_backtrace(trace) |