diff --git a/wc.rb b/wc.rb index 7b49b0a..509a821 100644 --- a/wc.rb +++ b/wc.rb @@ -51,10 +51,10 @@ def calculate_max_widths(total_stat) end def format_row(stats, max_widths, options) - row = %i[lines words bytes].filter_map do |key| + columns = %i[lines words bytes].filter_map do |key| stats[key].to_s.rjust(max_widths[key]) if options[key] end - [*row, stats[:filename]].join(' ') + [*columns, stats[:filename]].join(' ') end main