From c689ee1a89feb9d5acebb7a6092aef23af3cf35b Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 25 Jul 2009 08:49:08 +0000 Subject: * io.c (argf_eof): should not have reached EOF before trying to read. based on a patch by Heesob Park at [ruby-core:24559]. [ruby-core:24557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') 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)) { -- cgit v1.2.3