summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-05 16:37:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-05 16:37:25 +0000
commita5c6b705dbe19ac4123f7f5773c4a86cf74bec61 (patch)
treea7f425e38ccda1366618f87836b8cc9cea5224fc /regparse.c
parent46d6af3a9ca883ac2b68f11f8e2ad23e494510be (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/regparse.c b/regparse.c
index 092ba614c3..f86abc80ab 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);
}
}
}