do not propagate nils from completion_proc

Fix issue #656

The default completion_proc will generate an array which might contain nils,
and Coolline is not able to handle them gracefully.
This commit is contained in:
Zeh Rizzatti 2012-08-23 00:39:24 -04:00
parent 704cc6e859
commit e7eecfa8ea
1 changed files with 2 additions and 1 deletions

View File

@ -599,7 +599,8 @@ class Pry
if defined? Coolline and input.is_a? Coolline
input.completion_proc = proc do |cool|
completion_proc.call cool.completed_word
completions = completion_proc.call cool.completed_word
completions.compact
end
elsif input.respond_to? :completion_proc=
input.completion_proc = completion_proc