1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-12-02 06:58:52 +00:00
parent a3f29338ad
commit 4263bb432a
8 changed files with 26 additions and 10 deletions

7
ruby.c
View file

@ -266,11 +266,12 @@ process_sflag()
n = RARRAY(rb_argv)->len;
args = RARRAY(rb_argv)->ptr;
while (n--) {
char *s = STR2CSTR(*args);
while (n > 0) {
char *s = STR2CSTR(*args++);
char *p;
if (s[0] != '-') continue;
if (s[0] != '-') break;
n--;
if (s[1] == '-' && s[2] == '\0') break;
s[0] = '$';