class method
Gem.add_to_load_path
(*::String paths) -> ::Array[::String]
add_to_load_path(*paths)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems.rb, line 631
def self.add_to_load_path(*paths)
@activated_gem_paths = activated_gem_paths + paths.size
# gem directories must come after -I and ENV['RUBYLIB']
$LOAD_PATH.insert(Gem.load_path_insert_index, *paths)
end
Add a list of paths to the $LOAD_PATH at the proper place.
See also
.activated_gem_paths
.already_loaded?
.activate_and_load_bin_path
.binary_mode
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0