Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::QueryUtils#entry_versions
entry_versions(entry, name_tuples, platforms, specs)
lib/rubygems/query_utils.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems/query_utils.rb, line 240
def entry_versions(entry, name_tuples, platforms, specs)
return unless options[:versions]
list =
if platforms.empty? || options[:details]
name_tuples.map(&:version).uniq
else
platforms.sort.reverse.map do |version, pls|
out = version.to_s
if options[:domain] == :local
default = specs.any? do |s|
!s.is_a?(Gem::Source) && s.version == version && s.default_gem?
end
out = "default: #{out}" if default
end
if pls != [Gem::Platform::RUBY]
platform_list = [pls.delete(Gem::Platform::RUBY), *pls.sort].compact
out = platform_list.unshift(out).join(" ")
end
out
end
end
entry << " (#{list.join ", "})"
end
No documentation available
See also
#entry_details
#execute
#display_header
#gem_name?
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0