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 | 8b2239e9c3f11ce16917417e14d7e11e90e1f9ee (patch) | |
tree | cce0211c14874887245233ccde6a6ef10ae3d3f3 /regex.c | |
parent | 117aa1a98d161efedda949e4b3123142fd98c24e (diff) | |
download | ruby-8b2239e9c3f11ce16917417e14d7e11e90e1f9ee.tar.gz ruby-8b2239e9c3f11ce16917417e14d7e11e90e1f9ee.tar.xz ruby-8b2239e9c3f11ce16917417e14d7e11e90e1f9ee.zip |
* 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: http://svn.ruby-lang.org/repos/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) { |