1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (validate_enc_binmode): do not clear textmode flag if

default.  fixed #4732

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-05-27 13:45:12 +00:00
parent 9909c67583
commit b5bc09d234
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,7 @@
Fri May 27 22:38:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
Fri May 27 22:45:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (validate_enc_binmode): do not clear textmode flag if
default. fixed #4732
* io.c (fill_cbuf): finish reading at EOF.

2
io.c
View file

@ -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