[rubygems/rubygems] choose_from_list may return nil index since

https://github.com/rubygems/rubygems/commit/abacb0cb34cd

https://github.com/rubygems/rubygems/commit/5e2e9d6e50
This commit is contained in:
Akira Matsuda 2023-08-20 13:06:33 +09:00 committed by git
parent d5ffbca5c4
commit f69f775f24

View File

@ -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}]"