mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-06-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc05dcd5fe
commit
c613f625b7
5 changed files with 35 additions and 8 deletions
7
ruby.c
7
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue