summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-13 09:51:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-13 09:51:02 +0000
commit1b47fa1097c709be518a5071a7ec0e5271d45a00 (patch)
tree62f7220ccb1211efc9e1bc9b69c28448173c03bf /io.c
parent1c940e6cdd3e59430d57a42a9d5989bc5ad85270 (diff)
2000-06-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/io.c b/io.c
index 0a8b36a0ab..d33db2b3e8 100644
--- a/io.c
+++ b/io.c
@@ -582,7 +582,10 @@ rb_io_gets_internal(argc, argv, io)
c = getc(f);
TRAP_END;
if (c == EOF) {
- if (ferror(f) && errno == EINTR) continue;
+ if (ferror(f)) {
+ ig (errno == EINTR) continue;
+ rb_sys_fail(fptr->path);
+ }
break;
}
if ((*bp++ = c) == newline) break;
@@ -669,7 +672,10 @@ rb_io_gets(io)
c = getc(f);
TRAP_END;
if (c == EOF) {
- if (ferror(f) && errno == EINTR) continue;
+ if (ferror(f)) {
+ ig (errno == EINTR) continue;
+ rb_sys_fail(fptr->path);
+ }
break;
}
if ((*bp++ = c) == '\n') break;