diff options
| author | Akira Matsuda <ronnie@dio.jp> | 2023-08-20 13:06:33 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-20 09:04:38 +0000 |
| commit | f69f775f243ba2036b1b24a2beda1ca932040982 (patch) | |
| tree | 6cd56558b6412d318ffa4c6f8e07c930bedafde0 /lib | |
| parent | d5ffbca5c4b0a6548cfb4bae36fab860861b529c (diff) | |
[rubygems/rubygems] choose_from_list may return nil index since
https://github.com/rubygems/rubygems/commit/abacb0cb34cd
https://github.com/rubygems/rubygems/commit/5e2e9d6e50
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rubygems/uninstaller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index ac5fbfc8cf..c96df2a085 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -133,7 +133,7 @@ class Gem::Uninstaller if index == list.size remove_all list - elsif index >= 0 && index < list.size + elsif index && index >= 0 && index < list.size uninstall_gem list[index] else say "Error: must enter a number [1-#{list.size + 1}]" |
