summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-01 06:04:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-01 06:04:23 +0000
commit8776802385c3d87966d32a6171857abb7dac6998 (patch)
treea2a8ce2deedd2e2723b33416236ea18dd8bb878d /ext
parent78b45a0bc00bd717e5adf21f50373155e3b6eb24 (diff)
stringio.c: keep coderange
* ext/stringio/stringio.c (strio_write): keep coderange of ptr->string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index d15db8b076..57854919cd 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1182,7 +1182,7 @@ strio_write(VALUE self, VALUE str)
ptr->pos = olen;
}
if (ptr->pos == olen) {
- rb_str_cat(ptr->string, RSTRING_PTR(str), len);
+ rb_enc_str_buf_cat(ptr->string, RSTRING_PTR(str), len, enc);
}
else {
strio_extend(ptr, ptr->pos, len);