mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_check_writable): no need to check read buffer if
already changed to write mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6a04a2c7d8
commit
34fff376ff
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Aug 20 14:49:42 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_check_writable): no need to check read buffer if
|
||||
already changed to write mode.
|
||||
|
||||
Fri Aug 20 11:46:43 2004 UENO Katsuhiro <katsu@blue.sky.or.jp>
|
||||
|
||||
* ext/zlib/zlib.c: GzipReader#ungetc caused crc error.
|
||||
|
|
2
io.c
2
io.c
|
@ -254,7 +254,7 @@ rb_io_check_writable(fptr)
|
|||
if (!(fptr->mode & FMODE_WRITABLE)) {
|
||||
rb_raise(rb_eIOError, "not opened for writing");
|
||||
}
|
||||
if (READ_DATA_BUFFERED(fptr->f)) {
|
||||
if ((fptr->mode & FMODE_RBUF) && READ_DATA_BUFFERED(fptr->f)) {
|
||||
rb_warn("read buffer data lost");
|
||||
}
|
||||
#if NEED_IO_SEEK_BETWEEN_RW
|
||||
|
|
Loading…
Reference in a new issue