From aded3c95d5affe31100cb0549d613641fcbd80a7 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 25 Nov 2004 01:58:31 +0000 Subject: * 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 --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') 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)) { -- cgit