summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2020-07-09 14:47:13 -0700
committerJeremy Evans <[email protected]>2020-07-09 14:47:13 -0700
commite1bbb9ea9ce205320267783960cfb2e9215d5f52 ()
treef41741830934694a7c66734908608a3cb98b5fa7 /load.c
parentaddbb7d16e952e87133f210b3fc612e38a37c369 (diff)
Document that Kernel#load will load relative to current directory [ci skip]
Update and format the Kernel#load documentation to separate the three cases (absolute path, explicit relative path, other), and also document that it raises LoadError on failure. Fixes [Bug #16988]
-rw-r--r--load.c18
1 files changed, 15 insertions, 3 deletions
@@ -682,10 +682,22 @@ rb_load_protect(VALUE fname, int wrap, int *pstate)
*
* Loads and executes the Ruby program in the file _filename_.
*
- * 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