From d33991ae6a733d70e0e9fff9b41ade0bdf7dea32 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 2 Dec 2011 00:01:14 -0800 Subject: [PATCH] Be robust to current_prompt not returning a String. This happened by accident to me and it causes Pry to infiniloop --- lib/pry/pry_instance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 83351dc8..3542aee0 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -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