* ruby.c (load_file): '!' is already read. reported by gotoyuzo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2005-06-16 06:43:00 +00:00
parent 4fb012a86a
commit 79d206efef
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Thu Jun 16 15:41:32 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* ruby.c (load_file): '!' is already read. reported by gotoyuzo.
Thu Jun 16 15:09:38 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> Thu Jun 16 15:09:38 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* ext/tk/tcltklib.c (ip_rb_threadVwaitCommand): Tcl_Release was missing. * ext/tk/tcltklib.c (ip_rb_threadVwaitCommand): Tcl_Release was missing.

2
ruby.c
View File

@ -931,7 +931,7 @@ load_file(fname, script)
char *path; char *path;
char *pend = RSTRING(line)->ptr + RSTRING(line)->len; char *pend = RSTRING(line)->ptr + RSTRING(line)->len;
p = RSTRING(line)->ptr + 1; /* skip `#!' */ p = RSTRING(line)->ptr; /* skip `#!' */
if (pend[-1] == '\n') pend--; /* chomp line */ if (pend[-1] == '\n') pend--; /* chomp line */
if (pend[-1] == '\r') pend--; if (pend[-1] == '\r') pend--;
*pend = '\0'; *pend = '\0';