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 1603354391..8e264d53aa 100644
--- a/string.c
+++ b/string.c
@@ -4167,7 +4167,7 @@ rb_str_dump(VALUE str)
result = rb_str_new5(str, 0, len);
p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str);
- q = RSTRING_PTR(result); qend = q + len;
+ q = RSTRING_PTR(result); qend = q + len + 1;
*q++ = '"';
while (p < pend) {