summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-19 03:37:55 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-19 03:37:55 +0000
commit85c11656d2e8cdc1d490aaa373316ffc3330dcea (patch)
treed7e26bf2edde33843626a5d3fcf02152b0c86d33 /ruby.c
parent509ccdd86f66b7fa22dcf2973d0af2d55016c29d (diff)
downloadruby-85c11656d2e8cdc1d490aaa373316ffc3330dcea.tar.gz
ruby-85c11656d2e8cdc1d490aaa373316ffc3330dcea.tar.xz
ruby-85c11656d2e8cdc1d490aaa373316ffc3330dcea.zip
2000-06-19
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 4aa1ab583..ce9d5dcf3 100644
--- a/ruby.c
+++ b/ruby.c
@@ -679,6 +679,13 @@ load_file(fname, script)
fclose(fp);
f = rb_file_open(fname, "r");
+#if defined DOSISH || defined __CYGWIN__
+ {
+ char *ext = strrchr(fname, '.');
+ if (ext && strcasecmp(ext, ".exe") == 0)
+ rb_io_binmode(f);
+ }
+#endif
}
if (script) {