]> granicus.if.org Git - onig/commitdiff
[0-9-a] was not allowed as [0-9\-a]
authorK.Takata <kentkt@csc.jp>
Tue, 13 Dec 2016 13:26:22 +0000 (22:26 +0900)
committerK.Takata <kentkt@csc.jp>
Tue, 13 Dec 2016 13:26:36 +0000 (22:26 +0900)
This was originally fixed by Ruby r37175.

src/regparse.c

index 5e31f36a7608ce407e04cfeb941c0ff5f4442560..7e923df0081c133512aa1defb5ca84ea5bd5fd4f 100644 (file)
@@ -4340,7 +4340,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
        
         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) {
           CC_ESC_WARN(env, (UChar* )"-");
-          goto any_char_in;   /* [0-9-a] is allowed as [0-9\-a] */
+          goto range_end_val;   /* [0-9-a] is allowed as [0-9\-a] */
         }
         r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;
         goto err;