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 | 87e29e40db6e0743c54fbfc07f30397682e81a59 (patch) | |
| tree | 378b9267ccee82a107ee00180982a95f15ee4d87 /dir.c | |
| parent | ce8634e1e1e54911b90d925c997499c838011708 (diff) | |
| download | ruby-87e29e40db6e0743c54fbfc07f30397682e81a59.tar.gz ruby-87e29e40db6e0743c54fbfc07f30397682e81a59.tar.xz ruby-87e29e40db6e0743c54fbfc07f30397682e81a59.zip | |
* dir.c (rb_push_glob): simplified code (not change behavior)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
| -rw-r--r-- | dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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; |
