未验证 提交 2b2bf2c7 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #32851 from yskkin/doc_require_dependency

Document require_dependency [ci skip]
......@@ -224,6 +224,8 @@ def require_or_load(file_name)
Dependencies.require_or_load(file_name)
end
# :doc:
# Interprets a file using <tt>mechanism</tt> and marks its defined
# constants as autoloaded. <tt>file_name</tt> can be either a string or
# respond to <tt>to_path</tt>.
......@@ -242,6 +244,8 @@ def require_dependency(file_name, message = "No such file to load -- %s.rb")
Dependencies.depend_on(file_name, message)
end
# :nodoc:
def load_dependency(file)
if Dependencies.load? && Dependencies.constant_watch_stack.watching?
Dependencies.new_constants_in(Object) { yield }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册