redmine-backporter.rb: Fix #color for Ruby 3 splat

color(*PRIORITIES['Immediate']) didn't work with Ruby 3.
This commit is contained in:
Takashi Kokubun 2024-05-28 11:41:04 -07:00
parent a7eb3d077b
commit 2608f2a23b

View File

@ -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