Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::QueryUtils#version_platform_labels
version_platform_labels(version, platforms, platform_ruby_abis, label_platform: false)
lib/rubygems/query_utils.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/query_utils.rb, line 293
def version_platform_labels(version, platforms, platform_ruby_abis, label_platform: false)
platforms = platforms.uniq
return [] if platforms == [Gem::Platform::RUBY]
platforms = [platforms.delete(Gem::Platform::RUBY), *platforms.sort].compact
platforms.map do |platform|
ruby_abis = platform_ruby_abis[version][platform].uniq.sort
platform_label = label_platform ? "Platform: #{platform}" : platform
next platform_label if ruby_abis.empty?
separator = label_platform ? ", " : " "
"#{platform_label}#{separator}Ruby ABI: #{ruby_abis.join(", ")}"
end
end
No documentation available