1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Statement fix for clearing the first line.

I was being a muppet thinking the following line of code would work:

    puts if some_value ? 'true' : 'false'

When it should actually be the following:

    puts some_value ? 'true' : 'false'

This would cause Pry to display a blank line in the first line opposed to using
the ANSI characters for re-writing it.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
This commit is contained in:
Yorick Peterse 2012-06-11 20:01:24 +02:00
parent 5a4a9f6cdc
commit 723e1166c0

View file

@ -138,7 +138,7 @@ class Pry
# Clear the line before starting Pry. This fixes the issue discussed here: # Clear the line before starting Pry. This fixes the issue discussed here:
# https://github.com/pry/pry/issues/566 # https://github.com/pry/pry/issues/566
if Pry.config.auto_indent if Pry.config.auto_indent
puts if defined?(Win32::Console) ? "\e[0F" : "\e[0A\e[0G" puts defined?(Win32::Console) ? "\e[0F" : "\e[0A\e[0G"
end end
# Enter the matrix # Enter the matrix