diff --git a/lib/rdoc/stats/normal.rb b/lib/rdoc/stats/normal.rb index a3a6ff377e..41e6040452 100644 --- a/lib/rdoc/stats/normal.rb +++ b/lib/rdoc/stats/normal.rb @@ -42,7 +42,7 @@ def print_file files_so_far, filename if $stdout.tty? # 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 + $stdout.print("\r\e[K") if @last_width && @last_width > 0 @last_width = line.size $stdout.print("#{line}\r") else