From 09e36e478ff7c0f4ddedebe2ec8f3a7dbbec63bc Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 6 Jul 2014 01:03:36 +0000 Subject: 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 --- lib/rdoc/stats/normal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rdoc/stats/normal.rb b/lib/rdoc/stats/normal.rb index 64e20cc3c8..32de631e2e 100644 --- a/lib/rdoc/stats/normal.rb +++ b/lib/rdoc/stats/normal.rb @@ -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) -- cgit v1.2.3