summaryrefslogtreecommitdiffstats
path: root/regparse.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-20 22:45:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-20 22:45:17 +0000
commit0fffc11e391ba70530861cbfaf1ec511dc5ab050 (patch)
tree2fa19f8dc159755add82d2039898e2737bb4ee5a /regparse.c
parent4ebe3fd81065ad8d2c5610ddaa4ad74a2583f3b6 (diff)
downloadruby-0fffc11e391ba70530861cbfaf1ec511dc5ab050.tar.gz
ruby-0fffc11e391ba70530861cbfaf1ec511dc5ab050.tar.xz
ruby-0fffc11e391ba70530861cbfaf1ec511dc5ab050.zip
* regparse.c (parse_char_class): CCV_SB is only for single
byte. [ruby-dev:36786] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regparse.c b/regparse.c
index 0bd898b77..9ec441dab 100644
--- a/regparse.c
+++ b/regparse.c
@@ -4218,6 +4218,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
fetched = 0;
switch (r) {
case TK_CHAR:
+ if (tok->u.code >= SINGLE_BYTE_SIZE) goto code_point;
len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c);
if (len > 1) {
in_type = CCV_CODE_POINT;
@@ -4291,6 +4292,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
break;
case TK_CODE_POINT:
+ code_point:
v = tok->u.code;
in_israw = 1;
val_entry: