diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-08 20:58:42 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-08 20:58:42 +0000 |
commit | cceca83afe046b8c2b53eab6ab7c52faa1719b6d (patch) | |
tree | cfe7eac6ed4c0f4cabca1d7ec08ce1e144a8b95a /lib/rubygems/commands/query_command.rb | |
parent | 571ed8655fa499084114024c4a7f249228a8bc3d (diff) | |
download | ruby-cceca83afe046b8c2b53eab6ab7c52faa1719b6d.tar.gz |
* lib/rubygems/*: Remove unused variables warnings
Patch by Run Paint [ruby-core:30991]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r-- | lib/rubygems/commands/query_command.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index 93b417015c..65258fd1ac 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -161,19 +161,19 @@ class Gem::Commands::QueryCommand < Gem::Command end versions.each do |gem_name, matching_tuples| - matching_tuples = matching_tuples.sort_by do |(name, version,_),_| + matching_tuples = matching_tuples.sort_by do |(_, version,_),_| version end.reverse platforms = Hash.new { |h,version| h[version] = [] } - matching_tuples.map do |(name, version, platform,_),_| + matching_tuples.map do |(_, version, platform,_),_| platforms[version] << platform if platform end seen = {} - matching_tuples.delete_if do |(name, version,_),_| + matching_tuples.delete_if do |(_, version,_),_| if seen[version] then true else @@ -186,7 +186,7 @@ class Gem::Commands::QueryCommand < Gem::Command if options[:versions] then list = if platforms.empty? or options[:details] then - matching_tuples.map { |(name, version,_),_| version }.uniq + matching_tuples.map { |(_, version,_),_| version }.uniq else platforms.sort.reverse.map do |version, pls| if pls == [Gem::Platform::RUBY] then |