[前][次][番号順一覧][スレッド一覧]

ruby-changes:29712

From: naruse <ko1@a...>
Date: Thu, 4 Jul 2013 10:16:34 +0900 (JST)
Subject: [ruby-changes:29712] naruse:r41764 (trunk): * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.

naruse	2013-07-04 10:16:22 +0900 (Thu, 04 Jul 2013)

  New Revision: 41764

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41764

  Log:
    * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
      https://bugs.ruby-lang.org/issues/8583

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/oniguruma.h
    trunk/regcomp.c

Index: regcomp.c
===================================================================
--- regcomp.c	(revision 41763)
+++ regcomp.c	(revision 41764)
@@ -1943,7 +1943,12 @@ renumber_by_map(Node* node, GroupNumRema https://github.com/ruby/ruby/blob/trunk/regcomp.c#L1943
     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: https://github.com/ruby/ruby/blob/trunk/regcomp.c#L4095
   ( 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, i https://github.com/ruby/ruby/blob/trunk/regcomp.c#L6651
     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);
Index: include/ruby/oniguruma.h
===================================================================
--- include/ruby/oniguruma.h	(revision 41763)
+++ include/ruby/oniguruma.h	(revision 41764)
@@ -40,7 +40,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/oniguruma.h#L40
 #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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41763)
+++ ChangeLog	(revision 41764)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul  4 10:04:11 2013  NARUSE, Yui  <naruse@r...>
+
+	* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
+	  https://bugs.ruby-lang.org/issues/8583
+
 Thu Jul  4 00:36:03 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* internal.h (SIGNED_INTEGER_MAX): suppress warning C4146 on VC6.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]