diff --git a/ChangeLog b/ChangeLog index 6b420094c9..6df7c12d3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat May 28 03:04:27 2011 NARUSE, Yui + + * io.c (fill_cbuf): return MORE_CHAR_SUSPENDED when cbuf is not empty. + Sat May 28 02:22:48 2011 KOSAKI Motohiro * string.c (rb_str_bytesize): rb_str_bytesize() should use LONG2NUM(). diff --git a/io.c b/io.c index 20d526dfe0..4e1945c549 100644 --- a/io.c +++ b/io.c @@ -1720,6 +1720,9 @@ fill_cbuf(rb_io_t *fptr, int ec_flags) } } } + if (cbuf_len0 != fptr->cbuf.len) + return MORE_CHAR_SUSPENDED; + return MORE_CHAR_FINISHED; }