diff options
-rw-r--r-- | ruby.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1846,15 +1846,12 @@ open_load_file(VALUE fname_v, int *xflag) #else # define MODE_TO_LOAD (O_RDONLY) #endif - const int mode = -#ifdef O_BINARY - O_BINARY | -#endif - MODE_TO_LOAD; + int mode = MODE_TO_LOAD; #if defined DOSISH || defined __CYGWIN__ { const char *ext = strrchr(fname, '.'); if (ext && STRCASECMP(ext, ".exe") == 0) { + mode |= O_BINARY; *xflag = 1; } } |