pub unsafe extern "C" fn rb_require_string(feature: VALUE) -> VALUEExpand description
Finds and loads the given feature, if absent.
If the feature is an absolute path (e.g. starts with '/'), the feature
will be loaded directly using the absolute path. If the feature is an
explicit relative path (e.g. starts with './' or '../'), the feature
will be loaded using the relative path from the current directory.
Otherwise, the feature will be searched for in the library directories
listed in the $LOAD_PATH.
If the feature 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.
For extension libraries the given feature may use any shared library
extension. For example, on Linux you can require "socket.dll" to actually
load socket.so.
The absolute path of the loaded file is added to $LOADED_FEATURES. A file
will not be loaded again if its path already appears in there.
Any constants or globals within the loaded source file will be available in the calling program’s global namespace. However, local variables will not be propagated to the loading environment.
§@param[in] feature Name of a feature, e.g. "json".
@exception rb_eLoadError No such feature.
@exception rb_eRuntimeError $" is frozen; unable to push.
@retval RUBY_Qtrue The feature is loaded for the first time.
@retval RUBY_Qfalse The feature has already been loaded.
@post $" is updated.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3