Skip to content

Commit

Permalink
Merge pull request #1603 from deborasetton/master
Browse files Browse the repository at this point in the history
Pry::ColorPrinter.pp: add `newline` argument and pass it on to PP
  • Loading branch information
R-obert committed May 27, 2017
2 parents f19d3e2 + c7699e5 commit ddd0a2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pry/color_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class ColorPrinter < ::PP

CodeRay::Encoders::Terminal::TOKEN_COLORS[:comment][:self] = "\e[1;34m"

def self.pp(obj, out = $>, width = 79)
q = ColorPrinter.new(out, width)
def self.pp(obj, out = $>, width = 79, newline = "\n")
q = ColorPrinter.new(out, width, newline)
q.guard_inspect_key { q.pp obj }
q.flush
out << "\n"
Expand Down

0 comments on commit ddd0a2d

Please sign in to comment.