diff --git a/lib/pry/color_printer.rb b/lib/pry/color_printer.rb index e0852b28..f7c33e95 100644 --- a/lib/pry/color_printer.rb +++ b/lib/pry/color_printer.rb @@ -32,7 +32,9 @@ class Pry def pp(obj) super - rescue + rescue => e + raise if e.is_a? Pry::Pager::StopPaging + # Read the class name off of the singleton class to provide a default # inspect. eig = class << obj; self; end diff --git a/lib/pry/pager.rb b/lib/pry/pager.rb index 85c74776..a5239b37 100644 --- a/lib/pry/pager.rb +++ b/lib/pry/pager.rb @@ -181,7 +181,7 @@ class Pry::Pager @row += ((@col + line_length(line) - 1) / @cols) + 1 @col = 0 else - @col += line.length + @col += line_length(line) end end end