diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2024-05-28 11:41:04 -0700 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2024-05-28 11:41:31 -0700 |
| commit | 2608f2a23bb037f2b79e76c83d4b70716f039d1a (patch) | |
| tree | 56742fec27a06ca3172f45317a8144c74fcc6487 | |
| parent | a7eb3d077b4a0e4582380540830b9ef994f2a6a2 (diff) | |
redmine-backporter.rb: Fix #color for Ruby 3 splat
color(*PRIORITIES['Immediate']) didn't work with Ruby 3.
| -rwxr-xr-x | tool/redmine-backporter.rb | 6 |
1 files 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 |
