1
0
Fork 0
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:
Zeh Rizzatti 2012-08-23 00:39:24 -04:00
parent 704cc6e859
commit e7eecfa8ea

View file

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