diff options
author | Xavier Noria <fxn@hashref.com> | 2012-08-28 20:27:59 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-08-28 20:34:39 +0200 |
commit | b33700f5580b4cd85379a1dc60fa341ac4d8deb2 (patch) | |
tree | 8c531e63fa5f14282def9d7dfd30589584d3329f /activesupport/test/autoloading_fixtures/circular1.rb | |
parent | 844e944465beb37bd19bdfdedc19eba54479f39e (diff) | |
download | rails-b33700f5580b4cd85379a1dc60fa341ac4d8deb2.tar.gz rails-b33700f5580b4cd85379a1dc60fa341ac4d8deb2.tar.bz2 rails-b33700f5580b4cd85379a1dc60fa341ac4d8deb2.zip |
detect circular constant autoloading
Nowadays circular autoloads do not work, but the user gets a NameError
that says some constant is undefined. That's puzzling, because he is
normally trying to autoload a constant he knows can be autoloaded.
With this check we can give a better error message.
Diffstat (limited to 'activesupport/test/autoloading_fixtures/circular1.rb')
-rw-r--r-- | activesupport/test/autoloading_fixtures/circular1.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/autoloading_fixtures/circular1.rb b/activesupport/test/autoloading_fixtures/circular1.rb new file mode 100644 index 0000000000..a45761f066 --- /dev/null +++ b/activesupport/test/autoloading_fixtures/circular1.rb @@ -0,0 +1,6 @@ +silence_warnings do + Circular2 +end + +class Circular1 +end |