diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-05 16:37:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-05 16:37:25 +0000 |
commit | 933fd07e286242ef6a9d3b653cb26246d4886953 (patch) | |
tree | a7f425e38ccda1366618f87836b8cc9cea5224fc /regparse.c | |
parent | f8748a181f809613b5a4e2100dbe5ac9216fdf80 (diff) | |
download | ruby-933fd07e286242ef6a9d3b653cb26246d4886953.tar.gz ruby-933fd07e286242ef6a9d3b653cb26246d4886953.tar.xz ruby-933fd07e286242ef6a9d3b653cb26246d4886953.zip |
* regparse.c (i_apply_case_fold): fix for negative character class. a
patch from Yusuke ENDOH <mame AT tsg.ne.jp> in [ruby-core:13884].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r-- | regparse.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/regparse.c b/regparse.c index 092ba614c..f86abc80a 100644 --- a/regparse.c +++ b/regparse.c @@ -347,7 +347,7 @@ str_end_hash(st_strend_key* x) extern hash_table_type* onig_st_init_strend_table_with_size(int size) { - static struct st_hash_type hashType = { + static const struct st_hash_type hashType = { str_end_cmp, str_end_hash, }; @@ -4808,10 +4808,7 @@ i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[], } else { /* /(?i:[^A-C])/.match("a") ==> fail. */ - if (IS_NCCLASS_NOT(cc)) - BITSET_CLEAR_BIT(bs, *to); - else - BITSET_SET_BIT(bs, *to); + BITSET_SET_BIT(bs, *to); } } } |