summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-14 00:10:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-14 00:10:49 +0000
commitbce7601f73fa72465b65c3dacaddc21ac904ac92 (patch)
treebd8d55b839882ed64955602d55ad219c10353113 /string.c
parentf963fa6956c915e267546a177aea89a748592370 (diff)
downloadruby-bce7601f73fa72465b65c3dacaddc21ac904ac92.tar.gz
* string.c (rb_str_subpat_set): must make str independent after
rb_reg_search() matched. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index d83913c0ee..41d697bce0 100644
--- a/string.c
+++ b/string.c
@@ -1252,6 +1252,7 @@ rb_str_subpat_set(str, re, nth, val)
}
end = RMATCH(match)->END(nth);
len = end - start;
+ rb_str_modify(str);
rb_str_update(str, start, len, val);
}