From 09d146d09dfa8954ac3d1f2dd95c6c3f11604b09 Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 3 May 2002 22:39:40 +0000 Subject: * dir.c (fnmatch): Make PERIOD() independent of FNM_PATHNAME. This fixes a bug where fnmatch('/?a', '/.a', 0) returned true. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 8ade5471c..d016bf4f9 100644 --- a/dir.c +++ b/dir.c @@ -141,7 +141,7 @@ range(pat, test, flags) #define ISDIRSEP(c) (pathname && isdirsep(c)) #define PERIOD(s) (period && *(s) == '.' && \ - ((s) == string || ISDIRSEP((s)[-1]))) + ((s) == string || isdirsep((s)[-1]))) static int fnmatch(pat, string, flags) const char *pat; -- cgit