Skip to content

A platform for community discussion. Free, open, simple.

FIX: Ruby 3 does not freeze interpolated string (#14567)

Yasuo Honda2944d2cdd62a
diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb
index 1e9f06a3223..502409d3c19 100644
--- a/app/models/topic_embed.rb
+++ b/app/models/topic_embed.rb
@@ -34,7 +34,7 @@ class TopicEmbed < ActiveRecord::Base
contents = first_paragraph_from(contents)
end
contents ||= ''
- contents = +contents << imported_from_html(url)
+ contents = contents.dup << imported_from_html(url)
url = normalize_url(url)