ruby-changes:64955
From: Takashi <ko1@a...>
Date: Tue, 19 Jan 2021 15:53:21 +0900 (JST)
Subject: [ruby-changes:64955] 82386f21b9 (master): [ruby/irb] Use a real screen size for pp by default
https://git.ruby-lang.org/ruby.git/commit/?id=82386f21b9 From 82386f21b91383ac8074561ee563cb407fee16f9 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Mon, 18 Jan 2021 22:28:54 -0800 Subject: [ruby/irb] Use a real screen size for pp by default https://github.com/ruby/irb/commit/9b9300dec2 diff --git a/lib/irb/color_printer.rb b/lib/irb/color_printer.rb index 73a150f..34ba437 100644 --- a/lib/irb/color_printer.rb +++ b/lib/irb/color_printer.rb @@ -4,7 +4,7 @@ require 'irb/color' https://github.com/ruby/ruby/blob/trunk/lib/irb/color_printer.rb#L4 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/