From 9b01ce69546380c57cb602e045be4fc012cd81b7 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Tue, 21 Oct 1997 13:31:29 +0900 Subject: version 1.0-971021 https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971021.tar.gz Tue Oct 21 13:31:29 1997 Yukihiro Matsumoto * version 1.0-971021 Mon Oct 20 12:18:29 1997 WATANABE Hirofumi * ruby.c (load_file): wrong condition for #! check with -x. * file.c (file_s_dirname): did return "" for "/a". Fri Oct 17 14:29:09 1997 Yukihiro Matsumoto * bignum.c (bigadd): some undefined side effect order assumed. Co-authored-by: WATANABE Hirofumi --- ruby.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index ab08fd8c76..1bc89ad144 100644 --- a/ruby.c +++ b/ruby.c @@ -436,8 +436,8 @@ load_file(fname, script) while (!NIL_P(line = io_gets(f))) { line_start++; if (RSTRING(line)->len > 2 - || RSTRING(line)->ptr[0] != '#' - || RSTRING(line)->ptr[1] != '!') { + && RSTRING(line)->ptr[0] == '#' + && RSTRING(line)->ptr[1] == '!') { if (strstr(RSTRING(line)->ptr, "ruby")) { goto start_read; } @@ -453,8 +453,7 @@ load_file(fname, script) line_start++; if (RSTRING(line)->len > 2 - || RSTRING(line)->ptr[0] != '#' - || RSTRING(line)->ptr[1] != '!') { + && RSTRING(line)->ptr[0] == '!') { char *p; -- cgit v1.2.3