From 5e9c7fa37e59d11bab30e2362cfc6c868e1c28c3 Mon Sep 17 00:00:00 2001 From: Rikuoh Date: Thu, 1 Aug 2024 09:47:39 +0900 Subject: [PATCH] =?UTF-8?q?=E5=8D=98=E8=AA=9E=E3=82=92=E9=96=93=E9=81=95?= =?UTF-8?q?=E3=81=88=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wc.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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