From b500f3c9a5880b4ca0da3d358673d02e4952ce52 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 8 Aug 2009 10:56:00 +0000 Subject: merges r24271 from trunk into ruby_1_9_1. -- * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24449 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 48a639212..9ed097777 100644 --- a/io.c +++ b/io.c @@ -8041,7 +8041,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