diff options
Diffstat (limited to 'lib/rubygems/commands/list_command.rb')
-rw-r--r-- | lib/rubygems/commands/list_command.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/rubygems/commands/list_command.rb b/lib/rubygems/commands/list_command.rb index f3e5da9551..d9b7a9535e 100644 --- a/lib/rubygems/commands/list_command.rb +++ b/lib/rubygems/commands/list_command.rb @@ -7,8 +7,9 @@ require 'rubygems/commands/query_command' class Gem::Commands::ListCommand < Gem::Commands::QueryCommand - def initialize - super 'list', 'Display gems whose name starts with STRING' + def initialize(name = 'list', + summary = 'Display gems whose name starts with STRING') + super name, summary remove_option('--name-matches') end @@ -26,8 +27,9 @@ class Gem::Commands::ListCommand < Gem::Commands::QueryCommand end def execute - string = get_one_optional_argument || '' - options[:name] = /^#{string}/i + name = get_one_optional_argument || '' + options[:name] = /^#{name}/i + super end |