summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 01:58:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 01:58:31 +0000
commitaded3c95d5affe31100cb0549d613641fcbd80a7 (patch)
tree1be95a2f4bce6dc5f0be7f378639937c926f77f8 /string.c
parent8ef384feb3d8f3fed95793f4b142742de0492133 (diff)
downloadruby-aded3c95d5affe31100cb0549d613641fcbd80a7.tar.gz
ruby-aded3c95d5affe31100cb0549d613641fcbd80a7.tar.xz
ruby-aded3c95d5affe31100cb0549d613641fcbd80a7.zip
* configure.in: AC_PREREQ(2.53) [ruby-core:03800]
* io.c (read_all): [ruby-dev:24955] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7369 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 40f5eb224..c33cf55eb 100644
--- a/string.c
+++ b/string.c
@@ -669,8 +669,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)) {