aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gc.c b/gc.c
index c555f511e0..8b5c1a388a 100644
--- a/gc.c
+++ b/gc.c
@@ -630,17 +630,13 @@ gc_mark_children(ptr)
case T_ARRAY:
{
- int i, len = obj->as.array.len - 1;
+ int i, len = obj->as.array.len;
VALUE *ptr = obj->as.array.ptr;
for (i=0; i < len; i++) {
PUSH_MARK(*ptr);
ptr++;
}
- if (len >= 0) {
- obj = RANY(*ptr);
- goto Again;
- }
}
break;
@@ -698,17 +694,13 @@ gc_mark_children(ptr)
case T_STRUCT:
{
- int i, len = obj->as.rstruct.len - 1;
+ int i, len = obj->as.rstruct.len;
VALUE *ptr = obj->as.rstruct.ptr;
for (i=0; i < len; i++) {
PUSH_MARK(*ptr);
ptr++;
}
- if (len >= 0) {
- obj = RANY(ptr);
- goto Again;
- }
}
break;