diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-06 05:42:48 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-06 05:42:48 +0000 |
commit | f77db2ed9ca3f9c404594787b456b1cabee351c7 (patch) | |
tree | 378b9267ccee82a107ee00180982a95f15ee4d87 | |
parent | b21aa86d5c34128e4acdc9d9dc975d548919f1cd (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | dir.c | 12 |
2 files changed, 10 insertions, 6 deletions
@@ -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 @@ -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; |