summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-08 12:03:23 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-08 12:03:23 +0000
commitf3615ecc42d455d4453410a1c43401b06da46d38 (patch)
treeb744c10b48a8a19a6771289d76c81c4b2d509202 /dir.c
parent0477d9674e823f7381c722c01e663400b4417163 (diff)
* dir.c (range): Cancel previous change. More discussion is needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index 48e93ca9e6..b26eda4c38 100644
--- a/dir.c
+++ b/dir.c
@@ -97,7 +97,6 @@ range(pat, test, flags)
char test;
int flags;
{
- char *first = pat;
int not, ok = 0;
int nocase = flags & FNM_CASEFOLD;
int escape = !(flags & FNM_NOESCAPE);
@@ -120,13 +119,13 @@ range(pat, test, flags)
pat++;
cend = pat[1];
if (!cend)
- break;
+ return 0;
pat += 2;
}
if (downcase(cstart) <= test && test <= downcase(cend))
ok = 1;
}
- return test == '[' ? first : 0;
+ return 0;
}
#define ISDIRSEP(c) (pathname && isdirsep(c))