summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/string.c b/string.c
index 4f27d431ff..f0cea48267 100644
--- a/string.c
+++ b/string.c
@@ -775,7 +775,9 @@ VALUE
rb_str_buf_append(str, str2)
VALUE str, str2;
{
- return str_buf_cat(str, RSTRING(str2)->ptr, RSTRING(str2)->len);
+ str_buf_cat(str, RSTRING(str2)->ptr, RSTRING(str2)->len);
+ OBJ_INFECT(str, str2);
+ return str;
}
VALUE