Ensure lines are integers before using them as strings [Fixes #872]

The problem was that they could be Rational's if the mathn library was
required.
This commit is contained in:
Conrad Irwin 2013-03-04 23:11:19 -08:00
parent d6ef67cfa7
commit 8a6fdfe728
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ class Pry
_, cols = Terminal.screen_size
cols = cols.to_i
lines = cols != 0 ? (line_to_measure.length / cols + 1) : 1
lines = (cols != 0 ? (line_to_measure.length / cols + 1) : 1).to_i
if Pry::Helpers::BaseHelpers.windows_ansi?
move_up = "\e[#{lines}F"