diff options
author | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-27 16:20:02 +0000 |
---|---|---|
committer | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-27 16:20:02 +0000 |
commit | 803279135ce8585f31047a9b39200057622f935d (patch) | |
tree | c659eb28d69a5de228d15e17651ea256eda76bc4 /regcomp.c | |
parent | 4e85c0322aa3f9843a42ac1955004854dd501df5 (diff) | |
download | ruby-803279135ce8585f31047a9b39200057622f935d.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r6231,
which included commits to RCS files with non-trunk default branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 27 |
1 files changed, 11 insertions, 16 deletions
@@ -3950,22 +3950,17 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) } } - if (IS_NULL(cc->mbuf)) { - if (cc->not) { - for (i = 0; i < SINGLE_BYTE_SIZE; i++) { - add_char_opt_map_info(&opt->map, i); - } - mb_found = 1; - } - } - else { - for (i = 0; i < SINGLE_BYTE_SIZE; i++) { - z = ONIGENC_IS_MBC_HEAD(env->enc, i); - if (z) { - mb_found = 1; - add_char_opt_map_info(&opt->map, i); - } - } + if (! ONIGENC_IS_SINGLEBYTE(env->enc)) { + if (! IS_NULL(cc->mbuf) || + (cc->not != 0 && found != 0)) { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + z = ONIGENC_IS_MBC_HEAD(env->enc, i); + if (z) { + mb_found = 1; + add_char_opt_map_info(&opt->map, i); + } + } + } } if (mb_found) { |