Repository navigation
Conversation
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) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Error#to_markdownappends to a string literal (md = ""). Ruby 3.4 and later flag that whenever deprecation warnings are on:Minitest turns those warnings on, so an app whose tests render the error page prints this line on every run. The gem's own
error_to_markdown_test.rbprints it five times on Ruby 4.0.This starts from
+""instead, and marks the filefrozen_string_literal, asrecord.rbalready is. With the magic comment, the existingto_markdowntests raiseFrozenErroron any Ruby if a literal is mutated again: I checked that all five fail without the+.bundle exec rake test(57 runs) andbundle exec rake standardpass on Ruby 4.0.9.🤖 Generated with Claude Code