diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-07 10:11:40 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-07 10:11:40 +0000 |
| commit | c22cb0aa11a4ae6edd113b455b6a444f73db0885 (patch) | |
| tree | 8f00125b8aeaf1bdb52df921c79d8bd5013da389 | |
| parent | 2b19e63b0c1bc83f21a311db1554b60b496ab566 (diff) | |
| download | ruby-c22cb0aa11a4ae6edd113b455b6a444f73db0885.tar.gz ruby-c22cb0aa11a4ae6edd113b455b6a444f73db0885.tar.xz ruby-c22cb0aa11a4ae6edd113b455b6a444f73db0885.zip | |
* string.c (rb_str_replace): makes frozen shared string before
sharing.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | string.c | 2 |
2 files changed, 5 insertions, 2 deletions
@@ -1,7 +1,10 @@ -Thu Feb 7 18:57:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Feb 7 19:11:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_str_dup): reverted unneeded change. [ruby-dev:33634] + * string.c (rb_str_replace): makes frozen shared string before + sharing. + Thu Feb 7 16:33:51 2008 Tanaka Akira <akr@fsij.org> * io.c (io_reopen): don't change access mode for stdin, stdout and @@ -3049,7 +3049,7 @@ rb_str_replace(VALUE str, VALUE str2) } else { rb_str_modify(str); - str_replace_shared(str, str2); + str_replace_shared(str, rb_str_new4(str2)); } OBJ_INFECT(str, str2); |
