From b33700f5580b4cd85379a1dc60fa341ac4d8deb2 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 28 Aug 2012 20:27:59 +0200 Subject: 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. --- activesupport/test/autoloading_fixtures/circular1.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 activesupport/test/autoloading_fixtures/circular1.rb (limited to 'activesupport/test/autoloading_fixtures/circular1.rb') 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 -- cgit v1.2.3