diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-04 01:16:22 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-04 01:16:22 +0000 |
commit | d39f1964012613101037623021f470ffc770fbb0 (patch) | |
tree | 186ea298960fc127a486314065da4091142709d7 | |
parent | f23fe3192c0ada0b76ea95b539af6d4d04f60a6a (diff) |
* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
https://bugs.ruby-lang.org/issues/8583
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/ruby/oniguruma.h | 2 | ||||
-rw-r--r-- | regcomp.c | 13 |
3 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Thu Jul 4 10:04:11 2013 NARUSE, Yui <[email protected]> + + * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161. + https://bugs.ruby-lang.org/issues/8583 + Thu Jul 4 00:36:03 2013 Nobuyoshi Nakada <[email protected]> * internal.h (SIGNED_INTEGER_MAX): suppress warning C4146 on VC6. diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 0a78f1c14e..6a26ee4aaa 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -40,7 +40,7 @@ extern "C" { #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 5 #define ONIGURUMA_VERSION_MINOR 13 -#define ONIGURUMA_VERSION_TEENY 4 +#define ONIGURUMA_VERSION_TEENY 5 #ifdef __cplusplus # ifndef HAVE_PROTOTYPES @@ -1943,7 +1943,12 @@ renumber_by_map(Node* node, GroupNumRemap* map) r = renumber_by_map(NQTFR(node)->target, map); break; case NT_ENCLOSE: - r = renumber_by_map(NENCLOSE(node)->target, map); + { + EncloseNode* en = NENCLOSE(node); + if (en->type == ENCLOSE_CONDITION) + en->regnum = map[en->regnum].new_val; + r = renumber_by_map(en->target, map); + } break; case NT_BREF: @@ -4090,8 +4095,8 @@ restart: ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \ BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL ) -#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY ) -#define ALLOWED_ENCLOSE_IN_LB_NOT 0 +#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY | ENCLOSE_OPTION ) +#define ALLOWED_ENCLOSE_IN_LB_NOT ENCLOSE_OPTION #define ALLOWED_ANCHOR_IN_LB \ ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \ @@ -6646,7 +6651,7 @@ print_indent_tree(FILE* f, Node* node, int indent) fprintf(f, "<enclose:%"PRIxPTR"> ", (intptr_t)node); switch (NENCLOSE(node)->type) { case ENCLOSE_OPTION: - fprintf(f, "option:%d\n", NENCLOSE(node)->option); + fprintf(f, "option:%d", NENCLOSE(node)->option); break; case ENCLOSE_MEMORY: fprintf(f, "memory:%d", NENCLOSE(node)->regnum); |