summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-02 06:48:45 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-02 06:48:45 +0000
commit807daf9aabaf9543350e4078b11e07a8a34b4bf3 (patch)
treeba7390fd303e50950bab61c71176d178dc49d825 /io.c
parent9dfdf364157dad3556e9d68f192d5506b1d6bade (diff)
downloadruby-807daf9aabaf9543350e4078b11e07a8a34b4bf3.tar.gz
ruby-807daf9aabaf9543350e4078b11e07a8a34b4bf3.tar.xz
ruby-807daf9aabaf9543350e4078b11e07a8a34b4bf3.zip
* Makefile.in (CPPFLAGS): remove @includedir@.
* lib/mkmf.rb (create_makefile): ditto. * ext/extmk.rb.in (create_makefile): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io.c b/io.c
index 6520ce492..8057542f9 100644
--- a/io.c
+++ b/io.c
@@ -1195,7 +1195,9 @@ rb_io_fptr_cleanup(fptr, fin)
int fin;
{
if (fptr->mode & FMODE_FDOPEN) {
- io_fflush(GetWriteFile(fptr), fptr);
+ if (fptr->mode & FMODE_WRITABLE) {
+ io_fflush(GetWriteFile(fptr), fptr);
+ }
return;
}
if (fptr->finalize) {