1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Use a real screen size for pp by default

https://github.com/ruby/irb/commit/9b9300dec2
This commit is contained in:
Takashi Kokubun 2021-01-18 22:28:54 -08:00
parent a7d933e502
commit 82386f21b9

View file

@ -4,7 +4,7 @@ require 'irb/color'
module IRB
class ColorPrinter < ::PP
def self.pp(obj, out = $>, width = 79)
def self.pp(obj, out = $>, width = Reline.get_screen_size.last)
q = ColorPrinter.new(out, width)
q.guard_inspect_key {q.pp obj}
q.flush