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

* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0

Release note: b825775647/History.rdoc (500--2016-11-05)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-11-05 09:18:10 +00:00
parent 0a0eb2807e
commit cdc527db34
27 changed files with 62 additions and 144 deletions

View file

@ -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