1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* dir.c (rb_push_glob): simplified code (not change behavior)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2004-05-06 05:42:48 +00:00
parent b21aa86d5c
commit f77db2ed9c
2 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,7 @@
Thu May 6 14:38:02 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* dir.c (rb_push_glob): simplified code (not change behavior)
Thu May 6 13:32:44 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb: get rid of side effect of Config.expand, patched by

12
dir.c
View file

@ -1467,12 +1467,12 @@ rb_push_glob(str, flags) /* '\0' is delimiter */
pend = p + RSTRING(str)->len;
while (p < pend) {
int status;
while (p < pend && *p == '\0') p++;
if (p == pend) break;
status = push_glob(ary, p, flags);
if (status) rb_jump_tag(status);
while (p < pend && *p != '\0') p++;
if (*p) {
int status = push_glob(ary, p, flags);
if (status) rb_jump_tag(status);
p += strlen(p);
}
else p++;
}
return ary;