summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 2d4c64b..6899ac2 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1739,6 +1739,11 @@ load_file_internal(VALUE arg)
}
else {
int fd, mode = O_RDONLY;
+#if defined O_NONBLOCK
+ mode |= O_NONBLOCK;
+#elif defined O_NDELAY
+ mod |= O_NDELAY;
+#endif
#if defined DOSISH || defined __CYGWIN__
{
const char *ext = strrchr(fname, '.');