aboutsummaryrefslogtreecommitdiffstats
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 716bc6d506..b7e3316e3f 100644
--- a/io.c
+++ b/io.c
@@ -4981,7 +4981,7 @@ rb_io_oflags_fmode(int oflags)
{
int fmode = 0;
- switch (oflags & (O_RDONLY|O_WRONLY|O_RDWR)) {
+ switch (oflags & O_ACCMODE) {
case O_RDONLY:
fmode = FMODE_READABLE;
break;