summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/query_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
commit8289771e326006cc4e15a667e3eff3a72cfb3327 (patch)
treef6d367888b42848fd6a660fad57fa2020e38c097 /lib/rubygems/commands/query_command.rb
parent40d8543fbdec5485a638a2cb1008089d106b978d (diff)
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r--lib/rubygems/commands/query_command.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb
index 581d4bb734b..4f957625ee6 100644
--- a/lib/rubygems/commands/query_command.rb
+++ b/lib/rubygems/commands/query_command.rb
@@ -82,8 +82,10 @@ class Gem::Commands::QueryCommand < Gem::Command
end
entry = gem_name.dup
+
if options[:versions] then
- entry << " (#{list_of_matching.map{|gem| gem.version.to_s}.join(", ")})"
+ versions = list_of_matching.map { |s| s.version }.uniq
+ entry << " (#{versions.join ', '})"
end
entry << "\n" << format_text(list_of_matching[0].summary, 68, 4) if