summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-23 00:19:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-23 00:19:03 +0000
commit44a49bc2e038ee862ad61a987ac56ebfdb19549b (patch)
tree583a05a7b8d88229b9baf5a7581695c072ad6d37 /io.c
parent2e4c41f3949b46683531de81bfd8bccd9cb3607f (diff)
* io.c (io_reopen): readable flag was left unset for read-only IO.
fixed: [ruby-core:04003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7637 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 0d9f07a..370765a 100644
--- a/io.c
+++ b/io.c
@@ -3194,11 +3194,11 @@ io_reopen(io, nfile)
if (f2) {
fptr->f = rb_fdopen(fd, "r");
fptr->f2 = f2;
- fptr->mode |= FMODE_READABLE;
}
else {
fptr->f = rb_fdopen(fd, mode);
}
+ fptr->mode |= FMODE_READABLE;
}
rb_thread_fd_close(fd);
if ((orig->mode & FMODE_READABLE) && pos >= 0) {