Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #15278 from akshay-vishnoi/doc_changes

[ci skip] Improve doc for ModuleConstMissing.guess_for_anonymous
  • Loading branch information...
commit b850c4c540e8f0c15742f67c532f521a4a123655 2 parents d10d749 + 3f829a8
@pixeltrix pixeltrix authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 activesupport/lib/active_support/dependencies.rb
View
9 activesupport/lib/active_support/dependencies.rb
@@ -180,10 +180,11 @@ def const_missing(const_name)
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"

0 comments on commit b850c4c

Please sign in to comment.
Something went wrong with that request. Please try again.