public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Do not print trailing whitespaces.
Hongli Lai (Phusion) (author)
Sat Apr 19 14:02:12 -0700 2008
commit  22a61fe24aae3dcafbdfb58366070d060674edfb
tree    e67c6005608c7ef20f6a21bb467870ea57e82c0e
parent  981b957ed6cf8242a890a06640858810e234c9df
...
35
36
37
38
39
 
 
40
41
42
...
53
54
55
56
 
57
58
59
...
35
36
37
 
 
38
39
40
41
42
...
53
54
55
 
56
57
58
59
0
@@ -35,8 +35,8 @@ class Table
0
       end
0
     end
0
     
0
- format_string = max_column_widths.map{ |i| "%-#{i}s" }.join(" ") << "\n"
0
- header = sprintf(format_string, *@column_names)
0
+ format_string = max_column_widths.map{ |i| "%-#{i}s" }.join(" ")
0
+ header = sprintf(format_string, *@column_names).rstrip << "\n"
0
     if title
0
       free_space = header.size - title.size - 2
0
       if free_space <= 0
0
@@ -53,7 +53,7 @@ class Table
0
     end
0
     result << ("-" * header.size) << "\n"
0
     @rows.each do |row|
0
- result << sprintf(format_string, *row)
0
+ result << sprintf(format_string, *row).rstrip << "\n"
0
     end
0
     result
0
   end

Comments

    No one has commented yet.