diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-10 06:50:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-10 06:50:18 +0000 |
commit | b2fa1cbeda1b7893910205f38733430f521c3744 (patch) | |
tree | 0ed8dc323fd608bcb19fa18e1114351f8927eaf6 /string.c | |
parent | b814252d728cb08f159da1777feca4f8e9362327 (diff) |
1.1b7 pre2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@68 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -105,7 +105,8 @@ str_assign(str, str2) VALUE str, str2; { if (NIL_P(str2) || str == str2) return; - free(RSTRING(str)->ptr); + if (!RSTRING(str)->orig && RSTRING(str)->ptr) + free(RSTRING(str)->ptr); RSTRING(str)->ptr = RSTRING(str2)->ptr; RSTRING(str)->len = RSTRING(str2)->len; RSTRING(str)->orig = RSTRING(str2)->orig; |