Be robust to current_prompt not returning a String.

This happened by accident to me and it causes Pry to infiniloop
This commit is contained in:
Conrad Irwin 2011-12-02 00:01:14 -08:00
parent 3ae259b2b7
commit d33991ae6a
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ class Pry
current_prompt = select_prompt(eval_string, target)
indentation = Pry.config.auto_indent ? @indent.indent_level : ''
val = readline(current_prompt + indentation)
val = readline("#{current_prompt}#{indentation}")
# invoke handler if we receive EOF character (^D)
if !val