End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.load_path_insert_index
load_path_insert_index
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems.rb, line 586
def self.load_path_insert_index
$LOAD_PATH.each_with_index do |path, i|
return i if path.instance_variable_defined?(:@gem_prelude_index)
end
index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir']
index || 0
end
The index to insert activated gem paths into the $LOAD_PATH. The activated gem’s paths are inserted before site lib directory by default.
See also
.load_env_plugins
.load_plugins
.latest_version_for
.load_yaml
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1