diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-18 07:38:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-18 07:38:48 +0000 |
commit | 77ffc8bf3fec9e5b0e5d34b765b2285d4cda2090 (patch) | |
tree | 47e65ee28f75dcd404b12e95d6ff514d93050daa | |
parent | 41a8d90e7b884f3811eb65fa7cad566ff235890a (diff) |
* dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never
return NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | dir.c | 7 |
2 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Thu Dec 18 16:38:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never + return NULL. + Thu Dec 18 15:27:59 2003 WATANABE Hirofumi <eban@ruby-lang.org> * lib/ipaddr.rb (IPSocket::getaddress): merge usa's patch. @@ -44,7 +49,7 @@ Tue Dec 16 21:20:47 2003 Tanaka Akira <akr@m17n.org> Tue Dec 16 13:20:43 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - * ext/tk/lib/tk.rb: condition bug of if statement on + * ext/tk/lib/tk.rb: condition bug of if statement on {pack,grid}_propagate methods Tue Dec 16 03:17:29 2003 why the lucky stiff <why@ruby-lang.org> @@ -90,7 +90,6 @@ char *strchr _((char*,char)); #else #define isdirsep(c) ((c) == '/') #endif -#define find_dirsep(s) rb_path_next(s) static char * range(pat, test, flags) @@ -161,14 +160,14 @@ fnmatch(pat, string, flags) return FNM_NOMATCH; if (!c) { - if (pathname && find_dirsep(s)) + if (pathname && *rb_path_next(s)) return FNM_NOMATCH; else return 0; } else if (ISDIRSEP(c)) { - s = find_dirsep(s); - if (s) { + s = rb_path_next(s); + if (*s) { s++; break; } |