diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-04 10:37:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-04 10:37:05 +0000 |
commit | 36044b07730033911580501cbe1a060e820e927e (patch) | |
tree | 97a1e69b0f3be020dc84440566ec754e212a8f3f /string.c | |
parent | 99d96a89ce57edc4de2ff1acb1d4ed7737144140 (diff) | |
download | ruby-36044b07730033911580501cbe1a060e820e927e.tar.gz |
* string.c (rb_str_set_len): rb_str_modify cannot work before the
length is set, which is a precondition for rb_str_modify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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'; } |