mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
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:
parent
704cc6e859
commit
e7eecfa8ea
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue