From: "NARUSE, Yui" Date: 2010-11-14T21:49:17+09:00 Subject: [ruby-core:33171] Re: [Ruby 1.9-Bug#4044] Regex matching errors when using \W character class and /i option (2010/11/12 15:36), Heesob Park wrote: > And a possible patch is > > --- regparse.c 2010-11-12 15:10:07.000000000 +0900 > +++ regparse.c.new 2010-11-12 15:29:34.000000000 +0900 > @@ -5075,7 +5075,7 @@ > int is_in = onig_is_code_in_cc(env->enc, from, cc); > #ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS > if ((is_in != 0&& !IS_NCCLASS_NOT(cc)) || > - (is_in == 0&& IS_NCCLASS_NOT(cc))) { > + (is_in == 0&& IS_NCCLASS_NOT(cc)&& from< SINGLE_BYTE_SIZE)) { > if (ONIGENC_MBC_MINLEN(env->enc)> 1 || *to>= SINGLE_BYTE_SIZE) { > add_code_range0(&(cc->mbuf), env, *to, *to, 0); > } Thank you for a patch, but it breaks /[^\u0100]/i=~"\u0101" -- NARUSE, Yui