summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-20 02:21:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-20 02:21:14 +0000
commit78a75f90c082d505d9fc4be90526e94bf7a4c685 (patch)
tree9184708f7fdcd37e3724cdefa777a0e85c1a8ced /io.c
parentab2faa4567633807ac5307c9cc5cb9609ffc9425 (diff)
* io.c (rb_io_eof): check if closed before clearerr().
fixed: [ruby-dev:25251] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index ec16438ffd..f6ea3a1154 100644
--- a/io.c
+++ b/io.c
@@ -741,6 +741,7 @@ rb_io_eof(io)
ungetc(ch, fptr->f);
return Qfalse;
}
+ rb_io_check_closed(fptr);
clearerr(fptr->f);
return Qtrue;
}