diff --git a/ChangeLog b/ChangeLog index 925789055a..f3389f7b5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ Mon Mar 8 15:31:41 Hirokazu Yamamoto * dir.c (range): treat incomplete '[' as ordinary character (like has_magic does). + * dir.c (range): Cancel above change. More discussion is needed. + Sun Mar 7 22:37:46 2004 Masatoshi SEKI * test/drb/ut_drb.rb: use 'druby://localhost:0'. [ruby-dev:23078] 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))