aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-01-18 22:28:54 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2021-01-18 22:52:44 -0800
commit82386f21b91383ac8074561ee563cb407fee16f9 (patch)
tree139cd45b7fe5bb33d9dab207accd763c6bc7892d
parenta7d933e5021d1028d64a055b6dcf8631ea6a52c3 (diff)
downloadruby-82386f21b91383ac8074561ee563cb407fee16f9.tar.gz
[ruby/irb] Use a real screen size for pp by default
https://github.com/ruby/irb/commit/9b9300dec2
-rw-r--r--lib/irb/color_printer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/color_printer.rb b/lib/irb/color_printer.rb
index 73a150f881..34ba437c87 100644
--- a/lib/irb/color_printer.rb
+++ b/lib/irb/color_printer.rb
@@ -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