From 2608f2a23bb037f2b79e76c83d4b70716f039d1a Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 28 May 2024 11:41:04 -0700 Subject: [PATCH] redmine-backporter.rb: Fix #color for Ruby 3 splat color(*PRIORITIES['Immediate']) didn't work with Ruby 3. --- tool/redmine-backporter.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 69affd842c..47310c5abd 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -63,12 +63,12 @@ COLORS = { } class String - def color(fore=nil, back=nil, bold: false, underscore: false) + def color(fore=nil, back=nil, opts={}, bold: false, underscore: false) seq = "" - if bold + if bold || opts[:bold] seq << "\e[1m" end - if underscore + if underscore || opts[:underscore] seq << "\e[2m" end if fore