summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--parse.y3
-rw-r--r--regexec.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cfa56ff59c..13b63bdc1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Aug 20 23:55:25 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (parser_yylex): update paren_nest for brackets [].
+
Sun Aug 21 00:10:23 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add
diff --git a/parse.y b/parse.y
index baf4db6e23..ddff8aada8 100644
--- a/parse.y
+++ b/parse.y
@@ -6325,8 +6325,8 @@ parser_yylex(parser)
}
case ')':
- paren_nest--;
case ']':
+ paren_nest--;
case '}':
COND_LEXPOP();
CMDARG_LEXPOP();
@@ -6452,6 +6452,7 @@ parser_yylex(parser)
return c;
case '[':
+ paren_nest++;
if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state = EXPR_ARG;
if ((c = nextc()) == ']') {
diff --git a/regexec.c b/regexec.c
index 2c082de423..e9f6a2b995 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1170,7 +1170,7 @@ code_is_in_cclass_node(void* node, OnigCodePoint code, int enclen)
unsigned int in_cc;
CClassNode* cc = (CClassNode* )node;
- if (enclen == 1) {
+ if (enclen == 1 && code < SINGLE_BYTE_SIZE) {
in_cc = BITSET_AT(cc->bs, code);
}
else {