ruby-changes:34628
From: nobu <ko1@a...>
Date: Sun, 6 Jul 2014 10:03:47 +0900 (JST)
Subject: [ruby-changes:34628] nobu:r46711 (trunk): rdoc/stats/normal.rb: fix last_width
nobu 2014-07-06 10:03:36 +0900 (Sun, 06 Jul 2014) New Revision: 46711 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46711 Log: rdoc/stats/normal.rb: fix last_width * lib/rdoc/stats/normal.rb (print_file): reset @last_width to the last line size. Modified files: trunk/lib/rdoc/stats/normal.rb Index: lib/rdoc/stats/normal.rb =================================================================== --- lib/rdoc/stats/normal.rb (revision 46710) +++ lib/rdoc/stats/normal.rb (revision 46711) @@ -36,7 +36,7 @@ class RDoc::Stats::Normal < RDoc::Stats: https://github.com/ruby/ruby/blob/trunk/lib/rdoc/stats/normal.rb#L36 # 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/