mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Mention the case to autoload already defined constant
This commit is contained in:
parent
5342fcb67f
commit
1b44fcf222
1 changed files with 8 additions and 0 deletions
8
load.c
8
load.c
|
@ -1313,6 +1313,10 @@ ruby_init_ext(const char *name, void (*init)(void))
|
|||
* end
|
||||
* A.autoload(:B, "b")
|
||||
* A::B.doit # autoloads "b"
|
||||
*
|
||||
* If _const_ in _mod_ is defined as autoload, the file name to be
|
||||
* loaded is replaced with _filename_. If _const_ is defined but not
|
||||
* as autoload, does nothing.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1373,6 +1377,10 @@ rb_mod_autoload_p(int argc, VALUE *argv, VALUE mod)
|
|||
* a symbol) is accessed.
|
||||
*
|
||||
* autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
|
||||
*
|
||||
* If _const_ is defined as autoload, the file name to be loaded is
|
||||
* replaced with _filename_. If _const_ is defined but not as
|
||||
* autoload, does nothing.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Reference in a new issue