redmine-backporter.rb: Fix #color for Ruby 3 splat
color(*PRIORITIES['Immediate']) didn't work with Ruby 3.
This commit is contained in:
parent
a7eb3d077b
commit
2608f2a23b
@ -63,12 +63,12 @@ COLORS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class String
|
class String
|
||||||
def color(fore=nil, back=nil, bold: false, underscore: false)
|
def color(fore=nil, back=nil, opts={}, bold: false, underscore: false)
|
||||||
seq = ""
|
seq = ""
|
||||||
if bold
|
if bold || opts[:bold]
|
||||||
seq << "\e[1m"
|
seq << "\e[1m"
|
||||||
end
|
end
|
||||||
if underscore
|
if underscore || opts[:underscore]
|
||||||
seq << "\e[2m"
|
seq << "\e[2m"
|
||||||
end
|
end
|
||||||
if fore
|
if fore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user