diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-06 06:48:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-06 06:48:25 +0000 |
commit | 88b8c7e3ffdbc0116c31b8e9691743567d6e3e34 (patch) | |
tree | f3f7b20606f3531ad43c3a75708c4dcf1c37bfee /dir.c | |
parent | b516f1f25458c78974ff7dc5488b8dfaae997fae (diff) |
990806
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -538,7 +538,7 @@ dir_s_glob(dir, str) { char *p, *pend; char buffer[MAXPATHLEN], *buf = buffer; - char *t, *t0; + char *t; int nest; VALUE ary; @@ -552,18 +552,14 @@ dir_s_glob(dir, str) while (p < pend) { t = buf; + nest = 0; while (p < pend && isdelim(*p)) p++; while (p < pend && !isdelim(*p)) { + if (*p == '{') nest+=2; + if (*p == '}') nest+=3; *t++ = *p++; } *t = '\0'; - t0 = buf; - nest = 0; - while (t0 < t) { - if (*t0 == '{') nest+=2; - if (*t0 == '}') nest+=3; - t0++; - } if (nest == 0) { push_globs(ary, buf); } |