From c8ad96b6043a50f5397a3cb6c1ca0ca9196aa7e5 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 25 Mar 2026 01:32:34 -0700 Subject: [PATCH] Fix table column alignment for ratio values The ljust padding in format_ratio added trailing spaces to reserve room for significance symbols, but these spaces were then stripped by rstrip in the table formatter's format_row, causing the last column to lose its right-alignment. This was exposed by #492 which made pval nil when --pvalue is not passed, meaning the significance symbol is always empty in the common case, yet the ljust padding was still applied and then stripped. Remove the ljust padding entirely and let the table formatter handle column alignment, restoring the original format_ratio logic. --- lib/results_table_builder.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/results_table_builder.rb b/lib/results_table_builder.rb index 75f3ba9c..5aee5f66 100644 --- a/lib/results_table_builder.rb +++ b/lib/results_table_builder.rb @@ -214,8 +214,7 @@ def gc_ratio(base, other) def format_ratio(ratio, pval) sym = significance_symbol(pval) formatted = "%.3f" % ratio - suffix = sym.empty? ? "" : " (#{sym})" - (formatted + suffix).ljust(formatted.length + 6) + sym.empty? ? formatted : "#{formatted} (#{sym})" end def format_p_value(pval)