From 7f96e3096c78dc36088b20929b4146797ea39c84 Mon Sep 17 00:00:00 2001 From: Rikuoh Date: Thu, 1 Aug 2024 09:44:31 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90?= 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 ccde259..7b49b0a 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) - result = %i[lines words bytes].filter_map do |key| + row = %i[lines words bytes].filter_map do |key| stats[key].to_s.rjust(max_widths[key]) if options[key] end - [*result, stats[:filename]].join(' ') + [*row, stats[:filename]].join(' ') end main