summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-28 08:46:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-28 08:46:04 +0000
commita5084e5306fbbab3c231a4e4a97482454ba158fe (patch)
tree3ceeb5dbacf11de8588980ca16d9abbee0b253e8
parentfc35df91a575629c1bd6ebf44fc0d9dad0e9b907 (diff)
downloadruby-a5084e5306fbbab3c231a4e4a97482454ba158fe.tar.gz
ruby-a5084e5306fbbab3c231a4e4a97482454ba158fe.tar.xz
ruby-a5084e5306fbbab3c231a4e4a97482454ba158fe.zip
* io.c (argf_eof): should call next_argv() before testing.
[ruby-core:24561] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b37e094f2..2c54f2a0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,11 @@ Mon Jul 27 10:24:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rdoc/parser.rb (RDoc::Parser.binary?): fix for empty files.
[ruby-dev:38848]
+Mon Jul 27 06:51:41 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (argf_eof): should call next_argv() before testing.
+ [ruby-core:24561]
+
Sun Jul 26 19:17:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (argf_eof): go to the next file if called after ARGF.close
diff --git a/io.c b/io.c
index 3345caf48..fd0552b23 100644
--- a/io.c
+++ b/io.c
@@ -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();