[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:
parent
d5ffbca5c4
commit
f69f775f24
@ -133,7 +133,7 @@ class Gem::Uninstaller
|
|||||||
|
|
||||||
if index == list.size
|
if index == list.size
|
||||||
remove_all list
|
remove_all list
|
||||||
elsif index >= 0 && index < list.size
|
elsif index && index >= 0 && index < list.size
|
||||||
uninstall_gem list[index]
|
uninstall_gem list[index]
|
||||||
else
|
else
|
||||||
say "Error: must enter a number [1-#{list.size + 1}]"
|
say "Error: must enter a number [1-#{list.size + 1}]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user