summaryrefslogtreecommitdiffstats
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
commitc45c5472c4b9f8b245f533ece2f0117c5bbadb90 (patch)
treeda962495aa536dd18a163c71813259a2d2103d28 /gc.c
parent20f38e4cbd1bffcf2e775b1cc1cfa7f80bedab76 (diff)
downloadruby-c45c5472c4b9f8b245f533ece2f0117c5bbadb90.tar.gz
ruby-c45c5472c4b9f8b245f533ece2f0117c5bbadb90.tar.xz
ruby-c45c5472c4b9f8b245f533ece2f0117c5bbadb90.zip
* gc.c (gc_mark_children): should NOT treat last element of
structs and arrays specially. git-svn-id: http://svn.ruby-lang.org/repos/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 c555f511e..8b5c1a388 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;