summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
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 0db981e39c..5e04da806b 100644
--- a/io.c
+++ b/io.c
@@ -8037,7 +8037,7 @@ FILE *
rb_io_stdio_file(rb_io_t *fptr)
{
if (!fptr->stdio_file) {
- int oflags = rb_io_fmode_oflags(fptr->mode);
+ int oflags = rb_io_fmode_oflags(fptr->mode) & ~O_EXCL;
fptr->stdio_file = rb_fdopen(fptr->fd, rb_io_oflags_modestr(oflags));
}
return fptr->stdio_file;