diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index 5dc77857ea5d1..3ff3ef1070dab 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -58,10 +58,10 @@ def print_outdated(formulae) end outdated_versions = outdated_kegs - .group_by { |keg| Formulary.from_keg(keg) } - .sort_by { |formula, _kegs| formula.full_name } - .map do |formula, kegs| - "#{formula.full_name} (#{kegs.map(&:version).join(", ")})" + .group_by { |keg| Formulary.from_keg(keg).full_name } + .sort_by { |full_name, _kegs| full_name } + .map do |full_name, kegs| + "#{full_name} (#{kegs.map(&:version).join(", ")})" end.join(", ") puts "#{outdated_versions} < #{current_version}"