summaryrefslogtreecommitdiffstats
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
commit2d08493e2203da31865386ba2900cbfa76f68d8a (patch)
tree9184708f7fdcd37e3724cdefa777a0e85c1a8ced
parent522b553f0feb26c8cf69b17d22130ebafb966ecc (diff)
downloadruby-2d08493e2203da31865386ba2900cbfa76f68d8a.tar.gz
ruby-2d08493e2203da31865386ba2900cbfa76f68d8a.tar.xz
ruby-2d08493e2203da31865386ba2900cbfa76f68d8a.zip
* io.c (rb_io_eof): check if closed before clearerr().
fixed: [ruby-dev:25251] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 14606f23f..fe4ee3e50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Dec 20 11:21:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_eof): check if closed before clearerr().
+ fixed: [ruby-dev:25251]
+
Mon Dec 20 03:30:40 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/cgi/session.rb (CGI::Session#initialize): empty session id was
diff --git a/io.c b/io.c
index ec16438ff..f6ea3a115 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;
}