From 7de2c06352be3370e4fc51612bee35b2e6eacf4b Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 17 Jul 2024 14:13:16 -0400 Subject: [PATCH] [PRISM] Use RSTRING_LEN for Prism stream parsing --- prism_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prism_compile.c b/prism_compile.c index 7bd834d22d..d973a9bf44 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10485,7 +10485,7 @@ pm_parse_stdin_fgets(char *string, int size, void *stream) } const char *cstr = StringValuePtr(line); - long length = rb_str_strlen(line); + long length = RSTRING_LEN(line); memcpy(string, cstr, length); string[length] = '\0';