* regex.c (re_compile_pattern): /[\--\-]/ was warned. warn /]/.
* mkconfig.rb: escape `]' in regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e10fa962f
commit
66ca3af2ba
@ -1,3 +1,9 @@
|
|||||||
|
Thu Apr 10 00:39:32 2003 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* regex.c (re_compile_pattern): /[\--\-]/ was warned. warn /]/.
|
||||||
|
|
||||||
|
* mkconfig.rb: escape `]' in regexp.
|
||||||
|
|
||||||
Thu Apr 10 00:27:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Thu Apr 10 00:27:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* time.c (time_strftime): RSTRING(format)->ptr might become NULL.
|
* time.c (time_strftime): RSTRING(format)->ptr might become NULL.
|
||||||
|
@ -84,7 +84,7 @@ end
|
|||||||
|
|
||||||
dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/
|
dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/
|
||||||
v_others.collect! do |x|
|
v_others.collect! do |x|
|
||||||
if /^\s*CONFIG\["(?!abs_|old)[a-z]+(?:_prefix|dir)"]/ === x
|
if /^\s*CONFIG\["(?!abs_|old)[a-z]+(?:_prefix|dir)"\]/ === x
|
||||||
x.sub(dest, '= "$(DESTDIR)')
|
x.sub(dest, '= "$(DESTDIR)')
|
||||||
else
|
else
|
||||||
x
|
x
|
||||||
|
8
regex.c
8
regex.c
@ -1487,7 +1487,9 @@ re_compile_pattern(pattern, size, bufp)
|
|||||||
}
|
}
|
||||||
had_char_class = 0;
|
had_char_class = 0;
|
||||||
|
|
||||||
if (c == '-' && p != p0 + 1 && *p != ']')
|
if (c == '-' && ((p != p0 + 1 && *p != ']') ||
|
||||||
|
(p[0] == '-' && p[1] != ']') ||
|
||||||
|
range))
|
||||||
re_warning("character class has `-' without escape");
|
re_warning("character class has `-' without escape");
|
||||||
if (c == '[' && *p != ':')
|
if (c == '[' && *p != ':')
|
||||||
re_warning("character class has `[' without escape");
|
re_warning("character class has `[' without escape");
|
||||||
@ -1675,8 +1677,6 @@ re_compile_pattern(pattern, size, bufp)
|
|||||||
if (last > c)
|
if (last > c)
|
||||||
goto invalid_pattern;
|
goto invalid_pattern;
|
||||||
|
|
||||||
if (last == '-' || c == '-')
|
|
||||||
re_warning("character class has `-' without escape");
|
|
||||||
range = 0;
|
range = 0;
|
||||||
if (had_mbchar == 0) {
|
if (had_mbchar == 0) {
|
||||||
for (;last<=c;last++)
|
for (;last<=c;last++)
|
||||||
@ -2350,6 +2350,8 @@ re_compile_pattern(pattern, size, bufp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
if (c == ']')
|
||||||
|
re_warning("regexp has `]' without escape");
|
||||||
normal_char: /* Expects the character in `c'. */
|
normal_char: /* Expects the character in `c'. */
|
||||||
had_mbchar = 0;
|
had_mbchar = 0;
|
||||||
if (ismbchar(c)) {
|
if (ismbchar(c)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user