mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
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:
parent
d6ef67cfa7
commit
8a6fdfe728
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue