From affe49b23b9295ec30d50c363686324038d09158 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 23 Jan 2003 03:39:25 +0000 Subject: * parse.y (arg): syntaxify tPOW negative number hack. * parse.y (negate_lit): new function to negate literal numeric values in compile time. * regex.c (re_match_exec): charset info may be stored in MBC region when $KCODE != NONE. * error.c (set_syserr): should preserve duplicated error names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'regex.c') diff --git a/regex.c b/regex.c index 360b7a8efc..53eb9b469b 100644 --- a/regex.c +++ b/regex.c @@ -740,7 +740,7 @@ is_in_list(c, b) unsigned long c; const unsigned char *b; { - return is_in_list_sbc(c, b) || is_in_list_mbc(c, b); + return is_in_list_sbc(c, b) || (current_mbctype ? is_in_list_mbc(c, b) : 0); } static void @@ -1689,7 +1689,7 @@ re_compile_pattern(pattern, size, bufp) SET_LIST_BIT(c); had_num_literal = 0; } - else + else set_list_bits(c, c, b); had_mbchar = 0; } @@ -3838,16 +3838,16 @@ re_match_exec(bufp, string_arg, size, pos, beg, regs) MBC2WC(c, d); not = is_in_list_mbc(c, p); if (!not) { - part = not = is_in_list_sbc(cc, p); + part = not = is_in_list(cc, p); } } else { - not = is_in_list_sbc(c, p); + not = is_in_list(c, p); } } else { if (TRANSLATE_P()) c = (unsigned char)translate[c]; - not = is_in_list_sbc(c, p); + not = is_in_list(c, p); } if (*(p - 1) == (unsigned char)charset_not) { -- cgit v1.2.3