aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-07 10:11:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-07 10:11:40 +0000
commit1809782c3eaa24fc751ac2fd96fb204a51c15e68 (patch)
tree8f00125b8aeaf1bdb52df921c79d8bd5013da389 /string.c
parentfb506c3000b133d9dd4d423bcdf1290885ea6e22 (diff)
downloadruby-1809782c3eaa24fc751ac2fd96fb204a51c15e68.tar.gz
* string.c (rb_str_replace): makes frozen shared string before
sharing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index a9e90f2848..e24ca623dc 100644
--- a/string.c
+++ b/string.c
@@ -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);