diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-23 03:39:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-23 03:39:25 +0000 |
commit | affe49b23b9295ec30d50c363686324038d09158 (patch) | |
tree | cce0211c14874887245233ccde6a6ef10ae3d3f3 /regex.c | |
parent | f4f0be3a12c4fdba190df790c55805142cf71d1b (diff) | |
download | ruby-affe49b23b9295ec30d50c363686324038d09158.tar.gz |
* 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
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) { |