aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorYehuda Katz <yehudakatz@YK.local>2010-02-27 11:51:19 -0800
committerYehuda Katz <yehudakatz@YK.local>2010-02-27 11:51:19 -0800
commitd8acaf2b66be431ccd594cb90afc4ef2dc470b34 (patch)
tree158d958f754ec3236d8abc140fad68a573008bf9 /activesupport/lib
parent8247bd9d3e1c2772f2f1e0e7ee30ff7f19ddd0de (diff)
downloadrails-d8acaf2b66be431ccd594cb90afc4ef2dc470b34.tar.gz
rails-d8acaf2b66be431ccd594cb90afc4ef2dc470b34.tar.bz2
rails-d8acaf2b66be431ccd594cb90afc4ef2dc470b34.zip
Remove the noisy lines involving AS::Dependencies from the NameError stack trace if a constant cannot be found.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 96478ee947..2d7aa7e1e6 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -441,7 +441,10 @@ module ActiveSupport #:nodoc:
qualified_name = qualified_name_for from_mod, const_name
path_suffix = qualified_name.underscore
+
+ trace = caller.reject {|l| l =~ %r{#{__FILE__}}}
name_error = NameError.new("uninitialized constant #{qualified_name}")
+ name_error.set_backtrace(trace)
file_path = search_for_file(path_suffix)