summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-07-17 14:13:16 -0400
committerKevin Newton <[email protected]>2024-07-17 14:13:16 -0400
commit7de2c06352be3370e4fc51612bee35b2e6eacf4b (patch)
tree7059906e7198fe76388da549c71e7bb85fff97f5
parent278bbd7b45994c925633cd3cca280b3cabc913db (diff)
[PRISM] Use RSTRING_LEN for Prism stream parsing
-rw-r--r--prism_compile.c2
1 files changed, 1 insertions, 1 deletions
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';