aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/stats
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
commitbb8c0cf3c9cb6c0f637cb754bd52be77d2dac2e0 (patch)
tree237c953b345a00333d1600706a7f2484b4ad408c /lib/rdoc/stats
parent7ab1f709db436deecb4aed8f26d4dd844b4e25c8 (diff)
downloadruby-bb8c0cf3c9cb6c0f637cb754bd52be77d2dac2e0.tar.gz
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
Release note: https://github.com/rdoc/rdoc/blob/b825775647f62c5b525e9780a28ff2fbb1d5bf6f/History.rdoc#500--2016-11-05 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/stats')
-rw-r--r--lib/rdoc/stats/normal.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/rdoc/stats/normal.rb b/lib/rdoc/stats/normal.rb
index f32db48005..ba00b6cbdf 100644
--- a/lib/rdoc/stats/normal.rb
+++ b/lib/rdoc/stats/normal.rb
@@ -1,8 +1,5 @@
# frozen_string_literal: false
-begin
- require 'io/console/size'
-rescue LoadError
-end
+require 'io/console/size'
##
# Stats printer that prints just the files being documented with a progress
@@ -26,11 +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 = if defined?(IO) && IO.respond_to?(:console_size)
- IO.console_size[1].to_i.nonzero? || 80
- else
- 80
- end
+ 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
@@ -57,4 +50,3 @@ class RDoc::Stats::Normal < RDoc::Stats::Quiet
end
end
-