Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Commands::PushCommand#multiple_matches_message
multiple_matches_message(matches)
lib/rubygems/commands/push_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/commands/push_command.rb, line 141
def multiple_matches_message(matches)
message = "Multiple gems matched #{gem_name_selector_description}: #{matches.map(&:first).join(", ")}"
if options[:platform] && !options[:ruby_abi]
ruby_abis = matches.filter_map {|_, spec| spec.ruby_abi }.uniq.sort
message += "\nSpecify --ruby-abi with one of: #{ruby_abis.join(", ")}" unless ruby_abis.empty?
message += "\nTo push a gem without a Ruby ABI, pass the exact filename." if matches.any? {|_, spec| spec.ruby_abi.nil? }
elsif options[:ruby_abi] && !options[:platform]
platforms = matches.map {|_, spec| spec.platform.to_s }.uniq.sort
message += "\nSpecify --platform with one of: #{platforms.join(", ")}" unless platforms.empty?
end
message
end
No documentation available