summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/query_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 23:59:31 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 23:59:31 +0000
commit215fbc639fc63d4300a91ae4c8e30865f6a03f3c (patch)
tree13f0bc33bcdd0dca931c0af17a6ac1b70dd282f8 /lib/rubygems/commands/query_command.rb
parent9d4f37f51fb2ffdef5e318afb3cb81516dcba4f7 (diff)
Fix RubyGems for 1.9, r1780
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r--lib/rubygems/commands/query_command.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb
index cc81f3f07ed..f4d6120bcd0 100644
--- a/lib/rubygems/commands/query_command.rb
+++ b/lib/rubygems/commands/query_command.rb
@@ -131,18 +131,18 @@ class Gem::Commands::QueryCommand < Gem::Command
versions[spec_tuple.first] << [spec_tuple, source_uri]
end
- versions = versions.sort_by do |(name,),|
+ versions = versions.sort_by do |(name,_),_|
name.downcase
end
versions.each do |gem_name, matching_tuples|
- matching_tuples = matching_tuples.sort_by do |(name, version,),|
+ matching_tuples = matching_tuples.sort_by do |(name, version,_),_|
version
end.reverse
seen = {}
- matching_tuples.delete_if do |(name, version,),|
+ matching_tuples.delete_if do |(name, version,_),_|
if seen[version] then
true
else
@@ -154,7 +154,7 @@ class Gem::Commands::QueryCommand < Gem::Command
entry = gem_name.dup
if options[:versions] then
- versions = matching_tuples.map { |(name, version,),| version }.uniq
+ versions = matching_tuples.map { |(name, version,_),_| version }.uniq
entry << " (#{versions.join ', '})"
end