diff --git a/ChangeLog b/ChangeLog index 14298013c5..20cc4c658f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Fri May 27 22:38:54 2011 Nobuyoshi Nakada +Fri May 27 22:45:10 2011 Nobuyoshi Nakada + + * io.c (validate_enc_binmode): do not clear textmode flag if + default. fixed #4732 * io.c (fill_cbuf): finish reading at EOF. diff --git a/io.c b/io.c index 00f4ea62fa..bf06eaaecb 100644 --- a/io.c +++ b/io.c @@ -4419,10 +4419,12 @@ validate_enc_binmode(int *fmode_p, int ecflags, rb_encoding *enc, rb_encoding *e fmode |= DEFAULT_TEXTMODE; *fmode_p = fmode; } +#if !DEFAULT_TEXTMODE else if (!(ecflags & ECONV_NEWLINE_DECORATOR_MASK)) { fmode &= ~FMODE_TEXTMODE; *fmode_p = fmode; } +#endif } static void