Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.load_path_insert_index
() -> ::Integer
load_path_insert_index
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems.rb, line 615
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
.load_bundler_extensions
.load_safe_marshal
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0