diff options
author | MSP-Greg <[email protected]> | 2020-05-31 09:06:07 -0500 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-01 09:20:57 +0900 |
commit | 4cb8b49d41f76d0a2e95cecbd4fdd700d77c5098 (patch) | |
tree | c53db441ae82afe9ed9f80c332c343c996180368 /load.c | |
parent | 6a0405def25cd658184b844acfd83d15ccdae171 (diff) |
[DOC] relative filename `Kernel#.require` and `Kernel#.load` [ci skip]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3167
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -683,6 +683,7 @@ rb_load_protect(VALUE fname, int wrap, int *pstate) * If the filename neither resolves to an absolute path nor starts with * './' or '../', the file will be searched for in the library * directories listed in <code>$LOAD_PATH</code> (<code>$:</code>). + * If the filename starts with './' or '../', resolution is based on Dir.pwd. * * If the optional _wrap_ parameter is +true+, the loaded script will * be executed under an anonymous module, protecting the calling @@ -789,6 +790,7 @@ load_unlock(const char *ftptr, int done) * If the filename neither resolves to an absolute path nor starts with * './' or '../', the file will be searched for in the library * directories listed in <code>$LOAD_PATH</code> (<code>$:</code>). + * If the filename starts with './' or '../', resolution is based on Dir.pwd. * * If the filename has the extension ".rb", it is loaded as a source file; if * the extension is ".so", ".o", or ".dll", or the default shared library |