Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SpecificationRecord#stubs_for
stubs_for(name)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_record.rb, line 91
def stubs_for(name)
if @stubs
@stubs_by_name[name] || []
else
@stubs_by_name[name] ||= stubs_for_pattern("#{name}-*.gemspec").select do |s|
s.name == name
end
end
end
Returns a Gem::StubSpecification for every specification in the record named name only returns stubs that match Gem.platforms