зеркало из https://github.com/github/ruby.git
[DOC] Subjects of `autoload` are not restricted to modules
This commit is contained in:
Родитель
4eb140b0e4
Коммит
5342fcb67f
8
load.c
8
load.c
|
@ -1303,10 +1303,10 @@ ruby_init_ext(const char *name, void (*init)(void))
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* mod.autoload(module, filename) -> nil
|
||||
* mod.autoload(const, filename) -> nil
|
||||
*
|
||||
* Registers _filename_ to be loaded (using Kernel::require)
|
||||
* the first time that _module_ (which may be a String or
|
||||
* the first time that _const_ (which may be a String or
|
||||
* a symbol) is accessed in the namespace of _mod_.
|
||||
*
|
||||
* module A
|
||||
|
@ -1366,10 +1366,10 @@ rb_mod_autoload_p(int argc, VALUE *argv, VALUE mod)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* autoload(module, filename) -> nil
|
||||
* autoload(const, filename) -> nil
|
||||
*
|
||||
* Registers _filename_ to be loaded (using Kernel::require)
|
||||
* the first time that _module_ (which may be a String or
|
||||
* the first time that _const_ (which may be a String or
|
||||
* a symbol) is accessed.
|
||||
*
|
||||
* autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
|
||||
|
|
Загрузка…
Ссылка в новой задаче