summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 01:26:49 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 01:26:49 +0000
commit7d783091a2a1566519f4671fe94aa3866006fdbc (patch)
tree677c16fcb569dd464a4a210a5f4c183573c3d971 /string.c
parent35eac123de94c412415d33ed2c51bbdb98a8d707 (diff)
* io.c (read_all): [ruby-dev:24955]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 8615bf5..7416561 100644
--- a/string.c
+++ b/string.c
@@ -676,8 +676,8 @@ rb_str_resize(str, len)
rb_raise(rb_eArgError, "negative string size (or size too big)");
}
+ rb_str_modify(str);
if (len != RSTRING(str)->len) {
- rb_str_modify(str);
if (RSTRING(str)->len < len || RSTRING(str)->len - len > 1024) {
REALLOC_N(RSTRING(str)->ptr, char, len+1);
if (!FL_TEST(str, STR_NOCAPA)) {