summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/io.c b/io.c
index b4f46dacc4..355f430617 100644
--- a/io.c
+++ b/io.c
@@ -1027,6 +1027,7 @@ rb_io_getline(rs, fptr)
rb_io_check_readable(fptr);
if (NIL_P(rs)) {
+ if (feof(fptr->f)) return Qnil;
str = read_all(fptr, 0, Qnil);
}
else if (rs == rb_default_rs) {
@@ -3223,10 +3224,8 @@ rb_f_backquote(obj, str)
GetOpenFile(port, fptr);
result = read_all(fptr, remain_size(fptr), Qnil);
-
rb_io_close(port);
- if (NIL_P(result)) return rb_str_new(0,0);
return result;
}