mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 10:35:17 +03:00
23 lines
837 B
Diff
23 lines
837 B
Diff
|
diff --git a/ruby.c b/ruby.c
|
||
|
index d7ba181..e2a80df 100644
|
||
|
--- a/ruby.c
|
||
|
+++ b/ruby.c
|
||
|
@@ -2281,7 +2281,7 @@ load_file_internal(VALUE argp_v)
|
||
|
RSTRING_GETMEM(line, str, len);
|
||
|
if (len > 2 && str[0] == '#' && str[1] == '!') {
|
||
|
if (line_start == 1) warn_cr_in_shebang(str, len);
|
||
|
- if ((p = strstr(str+2, ruby_engine)) != 0) {
|
||
|
+ if ((p = strstr(str+2, ruby_engine)) != 0 && !getenv("TEA_PREFIX")) {
|
||
|
goto start_read;
|
||
|
}
|
||
|
}
|
||
|
@@ -2295,7 +2295,7 @@ load_file_internal(VALUE argp_v)
|
||
|
if (c == INT2FIX('!') && !NIL_P(line = rb_io_gets(f))) {
|
||
|
RSTRING_GETMEM(line, str, len);
|
||
|
warn_cr_in_shebang(str, len);
|
||
|
- if ((p = strstr(str, ruby_engine)) == 0) {
|
||
|
+ if ((p = strstr(str, ruby_engine)) == 0 && !getenv("TEA_PREFIX")) {
|
||
|
/* not ruby script, assume -x flag */
|
||
|
goto search_shebang;
|
||
|
}
|