summaryrefslogtreecommitdiff
path: root/prism_compile.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-07-17 12:03:21 -0400
committerKevin Newton <[email protected]>2024-07-17 13:58:58 -0400
commit7993b88eeec79cce14b04c37f91b0adc3ee1e14f ()
tree38bfb316cdbd6b1dac28ab70b932edfd5c6d068b /prism_compile.c
parent99825a539f990dff7e0d7cae082ab195a82ffaa5 (diff)
[PRISM] Use StringValuePtr for fgets for Prism stream parsing
Notes: Merged: https://.com/ruby/ruby/pull/11188
-rw-r--r--prism_compile.c4
1 files changed, 2 insertions, 2 deletions
@@ -10501,8 +10501,8 @@ pm_parse_stdin_fgets(char *string, int size, void *stream)
return NULL;
}
- const char *cstr = StringValueCStr(line);
- size_t length = strlen(cstr);
memcpy(string, cstr, length);
string[length] = '\0';