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

rdoc/stats/normal.rb: fix last_width

* lib/rdoc/stats/normal.rb (print_file): reset @last_width to the
  last line size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-07-06 01:03:36 +00:00
parent d054cab611
commit 09e36e478f

View file

@ -36,7 +36,7 @@ class RDoc::Stats::Normal < RDoc::Stats::Quiet
# Clean the line with whitespaces so that leftover output from the
# previous line doesn't show up.
$stdout.print("\r" << (" " * @last_width) << ("\b" * @last_width) << "\r") if @last_width && @last_width > 0
@last_width = 0
@last_width = line.size
$stdout.print("#{line}\r")
else
$stdout.puts(line)