Maintenance Ruby 3.4 gets fixes, but no new features. 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-3.4.1/lib/rubygems/specification_record.rb, line 67
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