From f1702261d740fbdca78ae1fbf87b66a59921e685 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 30 May 2024 10:32:33 +0900 Subject: [PATCH] Suppress warnings about frozen string literal feature ``` tool/redmine-backporter.rb:69: warning: literal string will be frozen in the future ``` --- tool/redmine-backporter.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 3f5c6feca9..843132ab3a 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -66,25 +66,25 @@ class String def color(fore=nil, back=nil, opts={}, bold: false, underscore: false) seq = "" if bold || opts[:bold] - seq << "\e[1m" + seq = seq + "\e[1m" end if underscore || opts[:underscore] - seq << "\e[2m" + seq = seq + "\e[2m" end if fore c = COLORS[fore] raise "unknown foreground color #{fore}" unless c - seq << "\e[#{c}m" + seq = seq + "\e[#{c}m" end if back c = COLORS[back] raise "unknown background color #{back}" unless c - seq << "\e[#{c + 10}m" + seq = seq + "\e[#{c + 10}m" end if seq.empty? self else - seq << self << "\e[0m" + seq = seq + self + "\e[0m" end end end