summaryrefslogtreecommitdiffstats
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
commitdcf06bd39ea72acbc312758e2df764c4b982b40c (patch)
treef6d367888b42848fd6a660fad57fa2020e38c097 /lib/rubygems/commands/query_command.rb
parenteb954f44e53ba18225a0e906891c47373ce0d651 (diff)
downloadruby-dcf06bd39ea72acbc312758e2df764c4b982b40c.tar.gz
ruby-dcf06bd39ea72acbc312758e2df764c4b982b40c.tar.xz
ruby-dcf06bd39ea72acbc312758e2df764c4b982b40c.zip
Import RubyGems 1.0.0, r1575
git-svn-id: http://svn.ruby-lang.org/repos/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 581d4bb73..4f957625e 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