ruby-changes:72274
From: Benoit <ko1@a...>
Date: Wed, 22 Jun 2022 01:40:58 +0900 (JST)
Subject: [ruby-changes:72274] 1f067e775d (master): Clarify documentation of Kernel#require_relative
https://git.ruby-lang.org/ruby.git/commit/?id=1f067e775d From 1f067e775d8629ac3b33f96dd885d5f996e787f3 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Tue, 21 Jun 2022 18:40:28 +0200 Subject: Clarify documentation of Kernel#require_relative --- load.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/load.c b/load.c index 2cdd64a163..a66940e0b7 100644 --- a/load.c +++ b/load.c @@ -945,9 +945,10 @@ rb_f_require(VALUE obj, VALUE fname) https://github.com/ruby/ruby/blob/trunk/load.c#L945 * call-seq: * require_relative(string) -> true or false * - * Ruby tries to load the library named _string_ relative to the requiring - * file's path. If the file's path cannot be determined a LoadError is raised. - * If a file is loaded +true+ is returned and false otherwise. + * Ruby tries to load the library named _string_ relative to the directory + * containing the requiring file. If the file does not exist a LoadError is + * raised. Returns +true+ if the file was loaded and +false+ if the file was + * already loaded before. */ VALUE rb_f_require_relative(VALUE obj, VALUE fname) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/