1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-12-18 07:38:48 +00:00
parent 41a8d90e7b
commit 77ffc8bf3f
2 changed files with 9 additions and 5 deletions

View file

@ -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.

7
dir.c
View file

@ -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;
}