diff --git a/lib/rubygems/commands/cleanup_command.rb b/lib/rubygems/commands/cleanup_command.rb index b9819a4f96..996733cef7 100644 --- a/lib/rubygems/commands/cleanup_command.rb +++ b/lib/rubygems/commands/cleanup_command.rb @@ -10,7 +10,7 @@ class Gem::Commands::CleanupCommand < Gem::Command :force => false, :install_dir => Gem.dir, :check_dev => true - add_option('-n', '-d', '--dryrun', + add_option('-n', '-d', '--dry-run', 'Do not uninstall gems') do |value, options| options[:dryrun] = true end diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb index 087d84710f..47d953d4dd 100644 --- a/test/rubygems/test_gem_commands_cleanup_command.rb +++ b/test/rubygems/test_gem_commands_cleanup_command.rb @@ -22,7 +22,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase end def test_handle_options_dry_run - @cmd.handle_options %w[--dryrun] + @cmd.handle_options %w[--dry-run] assert @cmd.options[:dryrun] end