summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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';