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 d9fd157446..bef54643f4 100644
--- a/io.c
+++ b/io.c
@@ -8500,7 +8500,7 @@ argf_to_io(VALUE argf)
static VALUE
argf_eof(VALUE argf)
{
- if (ARGF.current_file) {
+ if (RTEST(ARGF.current_file)) {
if (ARGF.init_p == 0) return Qtrue;
ARGF_FORWARD(0, 0);
if (rb_io_eof(ARGF.current_file)) {