summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 12:56:15 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 12:56:15 +0000
commitf6f3d1bc0e24cca8e369b09c68c26813a414248a (patch)
tree5607782387eae67209f448c0680e8c8936c76806 /string.c
parentd60d63ef804cad17387f8726fa6bdfec288300ce (diff)
* string.c (rb_str_set_len): call rb_str_modify.
* file.c (realpath_rec): don't call rb_str_modify before rb_str_set_len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index 78620b8048..29e84e3ffe 100644
--- a/string.c
+++ b/string.c
@@ -1667,6 +1667,7 @@ rb_str_unlocktmp(VALUE str)
void
rb_str_set_len(VALUE str, long len)
{
+ rb_str_modify(str);
STR_SET_LEN(str, len);
RSTRING_PTR(str)[len] = '\0';
}