From 72be7860170d2ccec7713a2b0ef43da133799d71 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 11 Jan 2024 14:19:41 -0500 Subject: [PATCH] [ruby/prism] Allow fsl comment to set to false https://github.com/ruby/prism/commit/b4db7bb703 --- prism/prism.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prism/prism.c b/prism/prism.c index c169bcadd8..96725b1ee0 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -6361,8 +6361,10 @@ parser_lex_magic_comment_encoding(pm_parser_t *parser) { */ static void parser_lex_magic_comment_frozen_string_literal_value(pm_parser_t *parser, const uint8_t *start, const uint8_t *end) { - if (start + 4 <= end && pm_strncasecmp(start, (const uint8_t *) "true", 4) == 0) { + if ((start + 4 <= end) && pm_strncasecmp(start, (const uint8_t *) "true", 4) == 0) { parser->frozen_string_literal = true; + } else if ((start + 5 <= end) && pm_strncasecmp(start, (const uint8_t *) "false", 5) == 0) { + parser->frozen_string_literal = false; } }