summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-16 06:00:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-16 06:00:12 +0000
commit62fda90d7adf5436d15f9407bed294bd5a4885be (patch)
treed1cca06d43b56fdeec621edc6436dffcc3b23017 /io.c
parentf0a314fa33d703d67543704e24146e3157a11360 (diff)
1.1b9_03 pre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io.c b/io.c
index 4e3f60c982..7c086970f4 100644
--- a/io.c
+++ b/io.c
@@ -111,7 +111,7 @@ void
io_check_closed(fptr)
OpenFile *fptr;
{
- if (fptr->f == NULL)
+ if (fptr->f == NULL && fptr->f2 == NULL)
Raise(eIOError, "closed stream");
}
@@ -691,7 +691,7 @@ static void
io_fptr_close(fptr)
OpenFile *fptr;
{
- if (fptr->f == NULL) return;
+ if (fptr->f == NULL && fptr->f2 == NULL) return;
if (fptr->finalize) {
(*fptr->finalize)(fptr);
@@ -886,7 +886,7 @@ rb_fdopen(fd, mode)
return f;
}
-#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__)
+#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) || 1
static struct pipe_list {
OpenFile *fptr;
struct pipe_list *next;
@@ -2500,7 +2500,7 @@ Init_IO()
rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);
-#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__)
+#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) || 1
atexit(pipe_atexit);
#endif