From 804fe618a7fa9e00ba83323af62bcac74697974d Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Fri, 13 Dec 2024 15:56:07 +0900 Subject: [PATCH] Fix: Avoid "literal string will be frozen in the future" warning on Ruby 3.4 --- app/views/gantts/show.html.erb | 4 ++-- app/views/repositories/_breadcrumbs.html.erb | 2 +- lib/redmine/i18n.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index c43f10fdd..b466577aa 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -309,7 +309,7 @@ style += "height:#{height}px;" style += "font-size:0.7em;" clss = "gantt_hdr" - clss << " nwday" if @gantt.non_working_week_days.include?(wday) + clss += " nwday" if @gantt.non_working_week_days.include?(wday) %> <%= content_tag(:div, :style => style, :class => clss) do %> <%= day_num.day %> @@ -340,7 +340,7 @@ style += "height: #{height}px;" style += "font-size:0.7em;" clss = "gantt_hdr" - clss << " nwday" if @gantt.non_working_week_days.include?(g_date.cwday) + clss += " nwday" if @gantt.non_working_week_days.include?(g_date.cwday) %> <%= content_tag(:div, :style => style, :class => clss) do %> <%= day_letter(g_date.cwday) %> diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index 4a5903e14..15b7b2c5f 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -9,7 +9,7 @@ breadcrumbs << link_to( @repository.identifier.presence || 'root', :action => 'show', :id => @project, :repository_id => @repository.identifier_param, :path => nil, :rev => @rev) -link_path = '' +link_path = +'' dirs.each do |dir| next if dir.blank? diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb index a9cd1dd0d..a0684d634 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -151,7 +151,7 @@ module Redmine languages_options :cache => false end end - options.map {|name, lang| [name.force_encoding("UTF-8"), lang.force_encoding("UTF-8")]} + options.map {|name, lang| [(+name).force_encoding("UTF-8"), (+lang).force_encoding("UTF-8")]} end def find_language(lang) -- 2.47.1