summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-25 08:49:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-25 08:49:08 +0000
commitc689ee1a89feb9d5acebb7a6092aef23af3cf35b (patch)
tree07805b36cc318388001956c681a8d37d3c09f4ec /io.c
parentd6ab828369b8ab6995b47abd9ab5982618c2d334 (diff)
* io.c (argf_eof): should not have reached EOF before trying to
read. based on a patch by Heesob Park <phasis AT gmail.com> at [ruby-core:24559]. [ruby-core:24557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)) {