From 2cc20c06e0e775467ff60098336f155565ad5f20 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 17 Jul 2024 15:45:07 -0400 Subject: [PATCH] [PRISM] Use RSTRING_PTR for Ruby parsing with fgets --- prism_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prism_compile.c b/prism_compile.c index d973a9bf44..b867b7900b 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10484,7 +10484,7 @@ pm_parse_stdin_fgets(char *string, int size, void *stream) return NULL; } - const char *cstr = StringValuePtr(line); + const char *cstr = RSTRING_PTR(line); long length = RSTRING_LEN(line); memcpy(string, cstr, length);