summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-23 05:35:32 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-23 05:35:32 +0000
commit6e87a54aecec13d500f90ed4a19ffebc6883794b (patch)
tree8dad6991e36a9eb9ad560c31b6e16ea9edb2a682 /ruby.c
parent730d8f1d326a62d86e41faa0482f9a3c329832cb (diff)
* ruby.c (proc_options): removed "-*-" support for #! line.
* io.c (rb_io_s_sysopen): new method to get a raw file descriptor. [new] * ext/socket/socket.c (tcp_sysaccept): new method to return an accepted socket fd (integer). [new] * ext/socket/socket.c (unix_sysaccept,sock_sysaccept): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ruby.c b/ruby.c
index 55dd7ab..6623095 100644
--- a/ruby.c
+++ b/ruby.c
@@ -561,6 +561,7 @@ proc_options(argc, argv)
s += numlen;
}
rb_set_safe_level(v);
+ s += numlen;
}
goto reswitch;
@@ -572,7 +573,7 @@ proc_options(argc, argv)
ruby_incpush(argv[1]);
argc--,argv++;
}
- break;
+ goto reswitch;
case '0':
{
@@ -624,11 +625,6 @@ proc_options(argc, argv)
}
break;
- case '*':
- case ' ':
- if (s[1] == '-') s+=2;
- break;
-
default:
fprintf(stderr, "%s: invalid option -%c (-h will show valid options)\n",
origargv[0], *s);
@@ -657,10 +653,12 @@ proc_options(argc, argv)
}
else {
while (s && *s) {
- while (ISSPACE(*s)) s++;
if (*s == '-') {
s++;
- if (ISSPACE(*s)) continue;
+ if (ISSPACE(*s)) {
+ do {s++;} while (ISSPACE(*s));
+ continue;
+ }
}
if (!*s) break;
if (!strchr("IdvwrK", *s))