Uh oh!
There was an error while loading. Please reload this page.
Use String#undump instead of eval - #333
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Racc’s grammar file lexer (GrammarFileParser#yylex0) to avoid eval when parsing quoted string literals, aiming to reduce code execution risk by using String#undump instead.
Changes:
- Replaces
eval(scan_quoted(...))withString#undumpfor string-literal parsing. - Adds a conversion step intended to make single-quoted literals compatible with
undump.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
hsbt
commented
Jul 28, 2026
Grammar files that use raw non-ASCII characters in double-quoted string tokens (e.g. "あ") now raise undump decodes |
String#undump is enough to parse a string literal.
kou
commented
Aug 13, 2026
Good point. I didn't notice it.
|
String#undumpis enough to parse a string literal.