Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Installer#load_plugin
load_plugin
lib/rubygems/installer.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/installer.rb, line 1059
def load_plugin
specs = Gem::Specification.find_all_by_name(spec.name)
# If old version already exists, this plugin isn't loaded
# immediately. It's for avoiding a case that multiple versions
# are loaded at the same time.
return unless specs.size == 1
plugin_files = spec.plugins.filter_map do |plugin|
path = File.join(@plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}")
path if File.exist?(path)
end
Gem.load_plugin_files(plugin_files) unless plugin_files.empty?
end
No documentation available
See also
#installed_specs
#load_relative_enabled?
#installation_satisfies_dependency?
#pre_install_checks
also in
4.0 · 3.4 · 3.3