From 672848de471ff160c37a91de3c9d114a359613b9 Mon Sep 17 00:00:00 2001 From: hsbt Date: Tue, 12 Sep 2017 12:51:43 +0000 Subject: [PATCH] Partly reverted r59845. All of environments on Ruby CI are fails rdoc generation. It may be caused by https://github.com/ruby/rdoc/commit/8cfa11d6f1cc7e74e45e42fd8d1d76c5a0646a6e git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/stats/normal.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/stats/normal.rb b/lib/rdoc/stats/normal.rb index 8ad0e453c6..ba00b6cbdf 100644 --- a/lib/rdoc/stats/normal.rb +++ b/lib/rdoc/stats/normal.rb @@ -1,5 +1,5 @@ # frozen_string_literal: false -require 'io/console' +require 'io/console/size' ## # Stats printer that prints just the files being documented with a progress @@ -23,7 +23,7 @@ class RDoc::Stats::Normal < RDoc::Stats::Quiet # Print a progress bar, but make sure it fits on a single line. Filename # will be truncated if necessary. - terminal_width = IO.console.winsize[1].to_i.nonzero? || 80 + terminal_width = IO.console_size[1].to_i.nonzero? || 80 max_filename_size = terminal_width - progress_bar.size if filename.size > max_filename_size then