summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 46f9725ce3..e068e44871 100644
--- a/string.c
+++ b/string.c
@@ -829,7 +829,7 @@ rb_str_succ(orig)
memmove(s+1, s, RSTRING(str)->len - n);
*s = c;
RSTRING(str)->len += 1;
-
+ RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
}
return str;