From b4a96686267c8bb261eca21c02acab9fd5f7ca96 Mon Sep 17 00:00:00 2001 From: Simon Coffey Date: Fri, 26 Jul 2013 17:37:00 +0100 Subject: Ensure all-caps nested consts marked as autoloaded Previously, an autoloaded constant `HTML::SomeClass` would not be marked as autoloaded by AS::Dependencies. This is because the `#loadable_constants_for_path` method uses `String#camelize` on the inferred file path, which in turn means that, unless otherwise directed, AS::Dependencies watches for loaded constants in the `Html` namespace. By passing the original qualified constant name to `#load_or_require`, this inference step is avoided, and the new constant is picked up in the correct namespace. --- activesupport/test/autoloading_fixtures/html/some_class.rb | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 activesupport/test/autoloading_fixtures/html/some_class.rb (limited to 'activesupport/test/autoloading_fixtures/html') diff --git a/activesupport/test/autoloading_fixtures/html/some_class.rb b/activesupport/test/autoloading_fixtures/html/some_class.rb new file mode 100644 index 0000000000..b43d15d891 --- /dev/null +++ b/activesupport/test/autoloading_fixtures/html/some_class.rb @@ -0,0 +1,4 @@ +module HTML + class SomeClass + end +end -- cgit v1.2.3