aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 24a2b9c7a0..d9a02c5b79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/string.c b/string.c
index 4c6301f56b..95d48289eb 100644
--- a/string.c
+++ b/string.c
@@ -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);