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 6d8b606c11..decc9d7f04 100644
--- a/string.c
+++ b/string.c
@@ -1692,7 +1692,7 @@ rb_str_unlocktmp(VALUE str)
void
rb_str_set_len(VALUE str, long len)
{
- rb_str_modify(str);
+ str_modifiable(str);
STR_SET_LEN(str, len);
RSTRING_PTR(str)[len] = '\0';
}