ruby-changes:61442
From: MSP-Greg <ko1@a...>
Date: Mon, 1 Jun 2020 09:21:10 +0900 (JST)
Subject: [ruby-changes:61442] 4cb8b49d41 (master): [DOC] relative filename `Kernel#.require` and `Kernel#.load` [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=4cb8b49d41 From 4cb8b49d41f76d0a2e95cecbd4fdd700d77c5098 Mon Sep 17 00:00:00 2001 From: MSP-Greg <Greg.mpls@g...> Date: Sun, 31 May 2020 09:06:07 -0500 Subject: [DOC] relative filename `Kernel#.require` and `Kernel#.load` [ci skip] diff --git a/load.c b/load.c index 22f30c6..91c9b31 100644 --- a/load.c +++ b/load.c @@ -683,6 +683,7 @@ rb_load_protect(VALUE fname, int wrap, int *pstate) https://github.com/ruby/ruby/blob/trunk/load.c#L683 * 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) https://github.com/ruby/ruby/blob/trunk/load.c#L790 * 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/