summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-27 08:08:39 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-27 08:08:39 +0000
commit1f25ed85a9a066ecff452df1512a42de04666053 (patch)
treef9c619a2977e62b8f4ef34281fa845aee33dbc5c /gc.c
parentceb8031b6b795b189012c38057ebf82733f4aeaf (diff)
990127
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 614b485..021989d 100644
--- a/gc.c
+++ b/gc.c
@@ -598,7 +598,8 @@ rb_gc_mark(ptr)
break;
case T_SCOPE:
- if (obj->as.scope.local_vars) {
+ if (obj->as.scope.local_vars &&
+ obj->as.scope.flag != SCOPE_ALLOCA) {
int n = obj->as.scope.local_tbl[0]+1;
VALUE *vars = &obj->as.scope.local_vars[-1];
@@ -807,7 +808,8 @@ obj_free(obj)
return; /* no need to free iv_tbl */
case T_SCOPE:
- if (RANY(obj)->as.scope.local_vars) {
+ if (RANY(obj)->as.scope.local_vars &&
+ RANY(obj)->as.scope.flag != SCOPE_ALLOCA) {
VALUE *vars = RANY(obj)->as.scope.local_vars-1;
if (vars[0] == 0)
free(RANY(obj)->as.scope.local_tbl);