* io.c (argf_eof): should call next_argv() before testing.

[ruby-core:24561]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2009-07-28 08:46:04 +00:00
parent fc13dbdcf5
commit 49991ff6f8
2 changed files with 6 additions and 0 deletions

1
io.c
View file

@ -8500,6 +8500,7 @@ argf_to_io(VALUE argf)
static VALUE
argf_eof(VALUE argf)
{
next_argv();
if (RTEST(ARGF.current_file)) {
if (ARGF.init_p == 0) return Qtrue;
next_argv();