summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-02 00:07:05 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-02 00:07:05 +0900
commitcd48737e118bcc1ed58e9710b9641e5a9e457179 (patch)
tree43965f59310e83e5419e5c1d9e978ec8e15977de /src/string.c
parent30556ad921d38482cc98174cdef36d5f8a67d8a0 (diff)
downloadmruby-cd48737e118bcc1ed58e9710b9641e5a9e457179.tar.gz
mruby-cd48737e118bcc1ed58e9710b9641e5a9e457179.zip
mrb_str_concat was broken for shared strings; close #214
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c
index b6ca9e489..044083848 100644
--- a/src/string.c
+++ b/src/string.c
@@ -337,6 +337,7 @@ mrb_str_concat(mrb_state *mrb, mrb_value self, mrb_value other)
struct RString *s1 = mrb_str_ptr(self), *s2;
int len;
+ str_modify(mrb, self);
if (mrb_type(other) != MRB_TT_STRING) {
other = mrb_str_to_str(mrb, other);
}