aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-05-24 13:15:34 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2014-05-24 13:15:34 +0100
commitb850c4c540e8f0c15742f67c532f521a4a123655 (patch)
treefb9a4c08646e12bb2a35d7c3562aaa75c2e2558d /activesupport
parentd10d749a8029960284310634011368dcd96d1a4e (diff)
parent3f829a83943a75a2bf3a407d74eac7f7f2788b17 (diff)
downloadrails-b850c4c540e8f0c15742f67c532f521a4a123655.tar.gz
rails-b850c4c540e8f0c15742f67c532f521a4a123655.tar.bz2
rails-b850c4c540e8f0c15742f67c532f521a4a123655.zip
Merge pull request #15278 from akshay-vishnoi/doc_changes
[ci skip] Improve doc for ModuleConstMissing.guess_for_anonymous
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/dependencies.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 59675d744e..8a545e4386 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -180,10 +180,11 @@ module ActiveSupport #:nodoc:
Dependencies.load_missing_constant(from_mod, const_name)
end
- # Dependencies assumes the name of the module reflects the nesting (unless
- # it can be proven that is not the case), and the path to the file that
- # defines the constant. Anonymous modules cannot follow these conventions
- # and we assume therefore the user wants to refer to a top-level constant.
+ # We assume that the name of the module reflects the nesting
+ # (unless it can be proven that is not the case) and the path to the file
+ # that defines the constant. Anonymous modules cannot follow these
+ # conventions and therefore we assume that the user wants to refer to a
+ # top-level constant.
def guess_for_anonymous(const_name)
if Object.const_defined?(const_name)
raise NameError, "#{const_name} cannot be autoloaded from an anonymous class or module"