diff --git a/ChangeLog b/ChangeLog index 118f7c301e..043b3bea98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Jun 16 01:41:00 2006 Nobuyoshi Nakada + + * eval.c (rb_proc_arity): get rid of segfault for mere splat. + + * gc.c (gc_mark_children): NODE_BLOCK_PASS needs u3 to be marked. + Wed Jun 14 18:00:20 2006 Eric Hodel * enum.c (enum_any): Documentation typo. diff --git a/eval.c b/eval.c index 78661fb1f2..03b046d6d9 100644 --- a/eval.c +++ b/eval.c @@ -8530,7 +8530,7 @@ rb_proc_arity(VALUE proc) list = list->nd_next; } if (var->nd_args) { - if (nd_type(var->nd_args) == NODE_POSTARG) { + if (var->nd_args != (NODE *)-1 && nd_type(var->nd_args) == NODE_POSTARG) { return -n-1-var->nd_args->nd_head->nd_alen; } return -n-1; diff --git a/gc.c b/gc.c index 92d4275e8b..5fdf120cd1 100644 --- a/gc.c +++ b/gc.c @@ -794,6 +794,7 @@ gc_mark_children(VALUE ptr, int lev) case NODE_RESBODY: case NODE_CLASS: case NODE_ARGS: + case NODE_BLOCK_PASS: gc_mark((VALUE)obj->as.node.u2.node, lev); /* fall through */ case NODE_BLOCK: /* 1,3 */ @@ -833,7 +834,6 @@ gc_mark_children(VALUE ptr, int lev) case NODE_MODULE: case NODE_ALIAS: case NODE_VALIAS: - case NODE_BLOCK_PASS: gc_mark((VALUE)obj->as.node.u1.node, lev); /* fall through */ case NODE_METHOD: /* 2 */