Skip to content

FrozenError: can't modify frozen String: "\\A" - #10

Open
yuri-zubov wants to merge 1 commit into
knu:masterfrom
yuri-zubov:fix-frozen-string-literal
Open

yuri-zubov wants to merge 1 commit into
knu:masterfrom
yuri-zubov:fix-frozen-string-literal

Conversation

@yuri-zubov

Copy link
Copy Markdown

AccessControlLine#compile appends to a '\A' string literal, which Ruby 3.4
warns about and which raises FrozenError with
--enable-frozen-string-literal:

    FrozenError: can't modify frozen String: "\\A"

Start from +'\A' instead. The generated robotstxt.rb gets the same
one-line change as robotstxt.ry rather than being regenerated, so the
diff stays small.

  AccessControlLine#compile appends to a '\A' string literal, which Ruby 3.4
  warns about and which raises FrozenError with
  --enable-frozen-string-literal:

    FrozenError: can't modify frozen String: "\\A"

  Start from +'\A' instead. The generated robotstxt.rb gets the same
  one-line change as robotstxt.ry rather than being regenerated, so the
  diff stays small.
@mergify

mergify Bot commented Nov 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@yuri-zubov yuri-zubov changed the title Use a mutable buffer for the robots.txt access pattern FrozenError: can't modify frozen String: "\\A" Nov 26, 2026
@yuri-zubov

Copy link
Copy Markdown
Author

@knu,
Could you merge this MR when you have a chance? Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant