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_pattern
stubs_for_pattern(pattern, match_platform = true)
lib/rubygems/specification_record.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_record.rb, line 105
def stubs_for_pattern(pattern, match_platform = true)
installed_stubs = installed_stubs(pattern)
installed_stubs.select! {|s| Gem::Platform.match_spec? s } if match_platform
stubs = installed_stubs + Gem::Specification.default_stubs(pattern)
Gem::Specification._resort!(stubs)
stubs
end
Finds stub specifications matching a pattern in the record, optionally filtering out specs not matching the current platform