diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-07 15:44:34 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-07 15:44:34 +0000 |
commit | e89d48a1e6867916b4ddc0863885a6ce05a16b46 (patch) | |
tree | cf8fdec5307d9026aca5e1023bf46236ca5c74fe /ruby.c | |
parent | 99a35bf0b31d18c1f2bffd653447b523b35da8d2 (diff) | |
download | ruby-e89d48a1e6867916b4ddc0863885a6ce05a16b46.tar.gz |
* ruby.c (warn_cr_in_shebang): meaningless check on DOSISH platforms.
fixed a test failure introduced at r53998.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1668,6 +1668,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt) return (VALUE)iseq; } +#ifndef DOSISH static void warn_cr_in_shebang(const char *str, long len) { @@ -1675,6 +1676,7 @@ warn_cr_in_shebang(const char *str, long len) rb_warn("shebang line ends with \\r may cause a problem"); } } +#endif struct load_file_arg { VALUE parser; @@ -1723,7 +1725,9 @@ load_file_internal(VALUE argp_v) line_start++; RSTRING_GETMEM(line, str, len); if (len > 2 && str[0] == '#' && str[1] == '!') { +#ifndef DOSISH if (line_start == 1) warn_cr_in_shebang(str, len); +#endif if ((p = strstr(str+2, ruby_engine)) != 0) { goto start_read; } @@ -1741,7 +1745,9 @@ load_file_internal(VALUE argp_v) return 0; RSTRING_GETMEM(line, str, len); +#ifndef DOSISH warn_cr_in_shebang(str, len); +#endif if ((p = strstr(str, ruby_engine)) == 0) { /* not ruby script, assume -x flag */ goto search_shebang; |