パッチの中で勝手に改行されてしまいました。 変更点は、IS_TO_VOID_TARGET(stk)の定義の中に、 (stk)->type == STK_NULL_CHECK_END を追加するだけです。 すいません。 -- 小迫 K.Kosako wrote: > NARUSE, Yui wrote: >> ところで、3のバックトラックを抑制する方法ですが、 >> nested_parentheses = >> /(?<pare> \( ([^\(\)]++ | \g<pare>)*+ \) )/x >> nested_parentheses =~ "((a))" >> のように *+ とすると core を吐きます。 > > バグです。 > Ruby 1.9でのパッチです。 > -- > 小迫 > > --- regexec.c.orig 2006-05-10 23:34:23.362696000 +0900 > +++ regexec.c 2006-05-21 01:55:17.318676800 +0900 > @@ -360,7 +360,8 @@ typedef struct _StackType { > /* stack type check mask */ > #define STK_MASK_POP_USED 0x00ff > #define IS_TO_VOID_TARGET(stk) \ > - (((stk)->type & STK_MASK_POP_USED) || (stk)->type == > STK_NULL_CHECK_START) > + (((stk)->type & STK_MASK_POP_USED) || \ > + (stk)->type == STK_NULL_CHECK_START || (stk)->type == > STK_NULL_CHECK_END) > > typedef struct { > void* stack_p;