Skip to content

Commit

Permalink
[DOC] Fix RDoc to match actual Kenrel.require behavior (#9180)
Browse files Browse the repository at this point in the history
  • Loading branch information
hogelog committed Dec 11, 2023
1 parent 69d60cc commit 4a94ce8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions load.c
Expand Up @@ -957,15 +957,14 @@ static VALUE rb_require_string_internal(VALUE fname, bool resurrect);
* 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
* extension on the current platform, Ruby loads the shared library as a
* Ruby extension. Otherwise, Ruby tries adding ".rb", ".so", and so on
* to the name until found. If the file named cannot be found, a LoadError
* will be raised.
* the extension is ".so", ".o", or the default shared library extension on
* the current platform, Ruby loads the shared library as a Ruby extension.
* Otherwise, Ruby tries adding ".rb", ".so", and so on to the name until
* found. If the file named cannot be found, a LoadError will be raised.
*
* For Ruby extensions the filename given may use any shared library
* extension. For example, on Linux the socket extension is "socket.so" and
* <code>require 'socket.dll'</code> will load the socket extension.
* For Ruby extensions the filename given may use ".so" or ".o". For example,
* on Windows the socket extension is "socket.dll" and
* <code>require 'socket.so'</code> will load the socket extension.
*
* The absolute path of the loaded file is added to
* <code>$LOADED_FEATURES</code> (<code>$"</code>). A file will not be
Expand Down

0 comments on commit 4a94ce8

Please sign in to comment.