* io.c (make_writeconv): useless branch removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-09-08 19:01:00 +00:00
parent 795bf7a665
commit c5d9a3cc3a
2 changed files with 4 additions and 8 deletions

View File

@ -1,3 +1,7 @@
Tue Sep 9 03:59:13 2008 Tanaka Akira <akr@fsij.org>
* io.c (make_writeconv): useless branch removed.
Tue Sep 9 02:18:20 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/encoding.h (rb_econv_decorate_at_first): declared.

8
io.c
View File

@ -729,14 +729,6 @@ make_writeconv(rb_io_t *fptr)
denc = enc->name;
fptr->writeconv_stateless = rb_str_new2(senc);
}
else if ((fptr->encs.ecflags & ECONV_STATEFUL_ENCODER_MASK) && !rb_enc_asciicompat(enc)) {
/* xxx: stateful encoder works for ASCII compatible encoding.
* So we need to choose an encoding which is ASCII compatible and superset of enc.
* For encodings which is superset of UTF-8, UTF-8 is not appropriate choice. */
senc = "UTF-8";
denc = enc->name;
fptr->writeconv_stateless = rb_str_new2("UTF-8");
}
else {
senc = denc = "";
fptr->writeconv_stateless = rb_str_new2(enc->name);