From efe6f15276e4a5911fc7e1b522a82c142e9d458d Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 8 Apr 2025 10:04:59 +0000 Subject: Fix: Avoid "literal string will be frozen in the future" warning on Ruby 3.4 (#41976). Patch by Go MAEDA (user:maeda) and Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23611 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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..d2cc35651 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -308,7 +308,7 @@ style += "width:#{width}px;" style += "height:#{height}px;" style += "font-size:0.7em;" - clss = "gantt_hdr" + clss = +"gantt_hdr" clss << " nwday" if @gantt.non_working_week_days.include?(wday) %> <%= content_tag(:div, :style => style, :class => clss) do %> @@ -339,7 +339,7 @@ style += "width: #{width}px;" style += "height: #{height}px;" style += "font-size:0.7em;" - clss = "gantt_hdr" + clss = +"gantt_hdr" clss << " nwday" if @gantt.non_working_week_days.include?(g_date.cwday) %> <%= content_tag(:div, :style => style, :class => clss) do %> 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 dc59819a2..f41e69474 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -152,7 +152,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) -- cgit v1.2.3