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 6482e32c51..4e402d9116 100644
--- a/string.c
+++ b/string.c
@@ -689,7 +689,7 @@ rb_str_resize(VALUE str, long len)
return str;
}
ptr = ALLOC_N(char,len+1);
- MEMCPY(ptr, RSTRING(str)->ary, char, RSTRING_LEN(str));
+ MEMCPY(ptr, RSTRING_PTR(str), char, RSTRING_LEN(str));
RSTRING(str)->as.heap.ptr = ptr;
STR_SET_NOEMBED(str);
}