Skip to content

Commit ee1f39e

Browse files
committed
Add a document to autoload
Users are responsible for avoiding circular autoload. [Misc #21154]
1 parent 4b844f7 commit ee1f39e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

load.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,9 @@ ruby_init_ext(const char *name, void (*init)(void))
14711471
* If _const_ in _mod_ is defined as autoload, the file name to be
14721472
* loaded is replaced with _filename_. If _const_ is defined but not
14731473
* as autoload, does nothing.
1474+
*
1475+
* Files that are currently being loaded must not be registered for
1476+
* autoload.
14741477
*/
14751478

14761479
static VALUE
@@ -1535,6 +1538,9 @@ rb_mod_autoload_p(int argc, VALUE *argv, VALUE mod)
15351538
* If _const_ is defined as autoload, the file name to be loaded is
15361539
* replaced with _filename_. If _const_ is defined but not as
15371540
* autoload, does nothing.
1541+
*
1542+
* Files that are currently being loaded must not be registered for
1543+
* autoload.
15381544
*/
15391545

15401546
static VALUE

0 commit comments

Comments
 (0)