mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode.c (rb_econv_binmode): binmode is effective only once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e24863549
commit
18b097b73b
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Aug 26 21:44:39 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode.c (rb_econv_binmode): binmode is effective only once.
|
||||
|
||||
Tue Aug 26 19:27:54 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* test/ruby/test_enum.rb (TestEnumerable#test_each_with_object):
|
||||
|
|
|
@ -1476,12 +1476,14 @@ rb_econv_binmode(rb_econv_t *ec)
|
|||
ec->elems[i].out_data_end = NULL;
|
||||
ec->elems[i].out_buf_end = NULL;
|
||||
ec->num_trans--;
|
||||
ec->opts.flags &= ~ECONV_UNIVERSAL_NEWLINE_DECODER;
|
||||
}
|
||||
if (ec->opts.flags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER)) {
|
||||
rb_transcoding_close(ec->elems[0].tc);
|
||||
xfree(ec->elems[0].out_buf_start);
|
||||
MEMMOVE(&ec->elems[0], &ec->elems[1], rb_econv_elem_t, ec->num_trans-1);
|
||||
ec->num_trans--;
|
||||
ec->opts.flags &= ~(ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue