Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Resolver::ActivationRequest#installed?
installed?
lib/rubygems/resolver/activation_request.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/resolver/activation_request.rb, line 101
def installed?
case @spec
when Gem::Resolver::VendorSpecification then
true
else
this_spec = full_spec
Gem::Specification.any? do |s|
s == this_spec && s.base_dir == this_spec.base_dir
end
end
end
True if the requested gem has already been installed.