Skip to content
This repository
Browse code

Escape the file name (who knows when a "(" might appear in a filename!)

  • Loading branch information...
commit 1c9de08734f5305f5cff560a192f7f58d3f3fc11 1 parent d8acaf2
authored February 27, 2010
2  activesupport/lib/active_support/dependencies.rb
@@ -442,7 +442,7 @@ def load_missing_constant(from_mod, const_name)
442 442
       qualified_name = qualified_name_for from_mod, const_name
443 443
       path_suffix = qualified_name.underscore
444 444
 
445  
-      trace = caller.reject {|l| l =~ %r{#{__FILE__}}}
  445
+      trace = caller.reject {|l| l =~ %r{#{Regexp.escape(__FILE__)}}}
446 446
       name_error = NameError.new("uninitialized constant #{qualified_name}")
447 447
       name_error.set_backtrace(trace)
448 448
 

0 notes on commit 1c9de08

Please sign in to comment.
Something went wrong with that request. Please try again.