summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index e4a0c21c19..6e7e549dd9 100644
--- a/io.c
+++ b/io.c
@@ -7193,7 +7193,7 @@ argf_readchar(VALUE argf)
VALUE ch;
retry:
- if (!next_argv()) return Qnil;
+ if (!next_argv()) return rb_eof_error();
if (TYPE(current_file) != T_FILE) {
ch = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
}