summaryrefslogtreecommitdiff
path: root/lib/pry/test/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry/test/helper.rb')
-rw-r--r--lib/pry/test/helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pry/test/helper.rb b/lib/pry/test/helper.rb
index aaa567af..2ef8289b 100644
--- a/lib/pry/test/helper.rb
+++ b/lib/pry/test/helper.rb
@@ -121,7 +121,10 @@ class PryTester
result = nil
strs.flatten.each do |str|
- str = "#{str.strip}\n"
+ # Check for space prefix. See #1369.
+ if str !~ /^\s\S/
+ str = "#{str.strip}\n"
+ end
@history.push str if @history
if @pry.process_command(str)