diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-28 05:23:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-28 05:23:33 +0000 |
commit | 53635dea12e9459168b45647cf52e26e0f1d451b (patch) | |
tree | 96e5a60d24ac9fa06975d70770df90948d86d067 /string.c | |
parent | 38b1f98a72129983956d26162df6825046ccf5db (diff) | |
download | ruby-53635dea12e9459168b45647cf52e26e0f1d451b.tar.gz |
* string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1834,6 +1834,7 @@ rb_str_aref_m(int argc, VALUE *argv, VALUE str) static void rb_str_splice_0(VALUE str, long beg, long len, VALUE val) { + rb_str_modify(str); if (len < RSTRING_LEN(val)) { /* expand string */ RESIZE_CAPA(str, RSTRING_LEN(str) + RSTRING_LEN(val) - len + 1); |