Permalink
Browse files

Do not print trailing whitespaces.

  • Loading branch information...
1 parent 981b957 commit 22a61fe24aae3dcafbdfb58366070d060674edfb @FooBarWidget FooBarWidget committed Apr 19, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/passenger-memory-stats
@@ -35,8 +35,8 @@ class Table
end
end
- format_string = max_column_widths.map{ |i| "%-#{i}s" }.join(" ") << "\n"
- header = sprintf(format_string, *@column_names)
+ format_string = max_column_widths.map{ |i| "%-#{i}s" }.join(" ")
+ header = sprintf(format_string, *@column_names).rstrip << "\n"
if title
free_space = header.size - title.size - 2
if free_space <= 0
@@ -53,7 +53,7 @@ class Table
end
result << ("-" * header.size) << "\n"
@rows.each do |row|
- result << sprintf(format_string, *row)
+ result << sprintf(format_string, *row).rstrip << "\n"
end
result
end

0 comments on commit 22a61fe

Please sign in to comment.