From c6ed42fc77634bd93119ccb169a5bf1af1cc3300 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 27 Oct 2026 16:05:37 +0100 Subject: [PATCH] Build the error markdown in a mutable string to_markdown appended to a string literal, which Ruby 3.4 and later flag with "literal string will be frozen in the future" whenever deprecation warnings are on. Minitest turns them on, so an app whose tests render the error page prints the warning on every run. Mark the file frozen_string_literal, as record.rb is, so the existing to_markdown tests raise FrozenError on any Ruby if a literal is mutated again. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/models/solid_errors/error.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/solid_errors/error.rb b/app/models/solid_errors/error.rb index 4b40739..2dd96ce 100644 --- a/app/models/solid_errors/error.rb +++ b/app/models/solid_errors/error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SolidErrors class Error < Record self.table_name = "solid_errors" @@ -57,7 +59,7 @@ def resolved? end def to_markdown - md = "" + md = +"" md << "## Exception: #{exception_class}\n" md << "**Severity:** #{severity} | **Source:** #{source}\n\n" md << "### Message\n#{message}\n"