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

ruby-changes:35465

From: usa <ko1@a...>
Date: Fri, 12 Sep 2014 11:33:12 +0900 (JST)
Subject: [ruby-changes:35465] usa:r47547 (ruby_2_0_0): * regcomp.c: Merge Onigmo 988517a4f16f14acbd7cc9d5b51a096d5153992c.

usa	2014-09-12 11:32:58 +0900 (Fri, 12 Sep 2014)

  New Revision: 47547

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

  Log:
    * regcomp.c: Merge Onigmo 988517a4f16f14acbd7cc9d5b51a096d5153992c.
      [Bug #9344].

  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/regparse.c
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/regparse.c
===================================================================
--- ruby_2_0_0/regparse.c	(revision 47546)
+++ ruby_2_0_0/regparse.c	(revision 47547)
@@ -5288,30 +5288,23 @@ set_quantifier(Node* qnode, Node* target https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regparse.c#L5288
 #ifdef USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
       if (!IS_QUANTIFIER_BY_NUMBER(qn) && !IS_QUANTIFIER_BY_NUMBER(qnt) &&
 	  IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) {
-        UChar buf[WARN_BUFSIZE];
-
         switch (ReduceTypeTable[targetq_num][nestq_num]) {
         case RQ_ASIS:
           break;
 
         case RQ_DEL:
-          if (onig_verb_warn != onig_null_warn) {
-            onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
-                                 env->pattern, env->pattern_end,
-                                 (UChar* )"redundant nested repeat operator");
-            (*onig_verb_warn)((char* )buf);
+          if (onig_warn != onig_null_warn) {
+            onig_syntax_warn(env, "regular expression has redundant nested repeat operator '%s'",
+                             PopularQStr[targetq_num]);
           }
           goto warn_exit;
           break;
 
         default:
-          if (onig_verb_warn != onig_null_warn) {
-            onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
-                                       env->pattern, env->pattern_end,
-            (UChar* )"nested repeat operator %s and %s was replaced with '%s'",
-            PopularQStr[targetq_num], PopularQStr[nestq_num],
-            ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]);
-            (*onig_verb_warn)((char* )buf);
+          if (onig_warn != onig_null_warn) {
+            onig_syntax_warn(env, "nested repeat operator '%s' and '%s' was replaced with '%s' in regular expression",
+                             PopularQStr[targetq_num], PopularQStr[nestq_num],
+                             ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]);
           }
           goto warn_exit;
           break;
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 47546)
+++ ruby_2_0_0/ChangeLog	(revision 47547)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Fri Sep 12 11:30:50 2014  NAKAMURA Usaku  <usa@r...>
+
+	* regcomp.c: Merge Onigmo 988517a4f16f14acbd7cc9d5b51a096d5153992c.
+	  [Bug #9344].
+
 Fri Sep 12 11:22:55 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* common.mk (Doxyfile): revert r43888, not to require preinstalled
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 47546)
+++ ruby_2_0_0/version.h	(revision 47547)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-09-12"
-#define RUBY_PATCHLEVEL 568
+#define RUBY_PATCHLEVEL 569
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 9

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

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