summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-01 04:51:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-01 04:51:22 +0000
commita313c30d9c05d125b035a546bd3aa835bb7b88be (patch)
treeda962495aa536dd18a163c71813259a2d2103d28 /gc.c
parenta8c4400d1a6c96710fb0253b96113f9a9bdf86b7 (diff)
* gc.c (gc_mark_children): should NOT treat last element of
structs and arrays specially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 c555f51..8b5c1a3 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;