Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#activate
activate
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 1417
def activate
other = Gem.loaded_specs[name]
if other
check_version_conflict other
return false
end
raise_if_conflicts
activate_dependencies
add_self_to_load_path
Gem.loaded_specs[name] = self
@activated = true
@loaded = true
true
end
Activate this spec, registering it as a loaded spec and adding it’s lib paths to $LOAD_PATH. Returns true if the spec was activated, false if it was previously activated. Freaks out if there are conflicts upon activation.
See also
#abbreviate
#activate_dependencies
.unresolved_specs
#add_bindir
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0