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 | |
| parent | 38b1f98a72129983956d26162df6825046ccf5db (diff) | |
* 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
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | string.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Tue Aug 28 14:23:31 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665] + Tue Aug 28 14:21:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (parser_prepare): set parser encode too when BOM exists. @@ -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); |
