Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.load_plugins
() -> ::Array[::String]
load_plugins
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems.rb, line 1151
def self.load_plugins
Gem.path.each do |gem_path|
abi_plugin_dir = File.join(plugindir(gem_path), ruby_abi)
abi_plugins = Gem::Util.glob_files_in_dir("*#{Gem.plugin_suffix_pattern}", abi_plugin_dir)
abi_plugin_names = abi_plugins.map {|plugin| File.basename(plugin) }
root_plugins = Gem::Util.glob_files_in_dir("*#{Gem.plugin_suffix_pattern}", plugindir(gem_path))
root_plugins.reject! {|plugin| abi_plugin_names.include?(File.basename(plugin)) }
load_plugin_files root_plugins
load_plugin_files abi_plugins
end
end
Find rubygems plugin files in the standard location and load them. At most one stub is loaded per gem: a stub in the running Ruby’s ABI directory wins over a root stub of the same name, since it was installed specifically for this Ruby.
See also
.load_path_insert_index
.load_safe_marshal
.load_env_plugins
.load_yaml
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0