summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-28 09:26:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-28 09:26:53 +0000
commit16adedaa6d6ceb8e3f21e33dc6653aed3ffa6932 (patch)
treed1c104d8b5e197b22830a2c37f84327de76586b3 /dir.c
parent7dcd244615f172994ca4af37108af7ff744d0998 (diff)
990728
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 93458a3b74..e5b8ca779a 100644
--- a/dir.c
+++ b/dir.c
@@ -485,6 +485,7 @@ push_braces(ary, s)
char buffer[MAXPATHLEN], *buf = buffer;
char *p, *t, *b;
char *lbrace, *rbrace;
+ int nest = 0;
p = s;
lbrace = rbrace = 0;
@@ -496,7 +497,8 @@ push_braces(ary, s)
p++;
}
while (*p) {
- if (*p == '}' && lbrace) {
+ if (*p == '{') nest++;
+ if (*p == '}' && --nest == 0) {
rbrace = p;
break;
}