Permalink
Browse files

Merge pull request #1137 from joshwlewis/mathn_indent

Ensure lines are integers, not rationals during indention.
  • Loading branch information...
2 parents 047788c + ec8378f commit 1def81179b07ca598591e433324bb6ee20d04b7d @yui-knk yui-knk committed Feb 23, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pry/indent.rb
View
2 lib/pry/indent.rb
@@ -390,7 +390,7 @@ def correct_indentation(prompt, code, overhang=0)
_, cols = Terminal.screen_size
cols = cols.to_i
- lines = cols != 0 ? (full_line.length / cols + 1) : 1
+ lines = (cols != 0 ? (full_line.length / cols + 1) : 1).to_i
if Pry::Helpers::BaseHelpers.windows_ansi?
move_up = "\e[#{lines}F"

0 comments on commit 1def811

Please sign in to comment.