diff options
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 d947d588ef..5a42d45249 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -39,7 +39,7 @@ class Gem::Commands::QueryCommand < Gem::Command options[:details] = value end - add_option( '--[no-]versions', + add_option('--[no-]versions', 'Display only gem names') do |value, options| options[:versions] = value options[:details] = false unless value @@ -56,7 +56,7 @@ class Gem::Commands::QueryCommand < Gem::Command options[:exact] = value end - add_option( '--[no-]prerelease', + add_option('--[no-]prerelease', 'Display prerelease versions') do |value, options| options[:prerelease] = value end @@ -141,9 +141,9 @@ is too hard to use. display_header 'LOCAL' - specs = Gem::Specification.find_all { |s| + specs = Gem::Specification.find_all do |s| s.name =~ name and req =~ s.version - } + end spec_tuples = specs.map do |spec| [spec.name_tuple, spec] |