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

* dir.c (range): treat incomplete '[' as ordinary character (like

has_magic does).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2004-03-08 06:32:40 +00:00
parent 5b98906936
commit 44175158a2
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Mar 8 15:31:41 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* dir.c (range): treat incomplete '[' as ordinary character (like
has_magic does).
Sun Mar 7 22:37:46 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* test/drb/ut_drb.rb: use 'druby://localhost:0'. [ruby-dev:23078]

5
dir.c
View file

@ -97,6 +97,7 @@ 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);
@ -119,13 +120,13 @@ range(pat, test, flags)
pat++;
cend = pat[1];
if (!cend)
return 0;
break;
pat += 2;
}
if (downcase(cstart) <= test && test <= downcase(cend))
ok = 1;
}
return 0;
return test == '[' ? first : 0;
}
#define ISDIRSEP(c) (pathname && isdirsep(c))