summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 18:31:58 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 18:31:58 +0000
commit919887813900fa61026f072a5cbcfd7ad873ea97 (patch)
tree9eab32003eccefe34fd9a27b0050e7e616ea9580 /gc.c
parent665787ea4e0cef0157d6f4a6bca65973ce8839be (diff)
Fix method scoping bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 9ea6f302c5..66ce2634cd 100644
--- a/gc.c
+++ b/gc.c
@@ -1316,7 +1316,7 @@ obj_free(obj)
VALUE *vars = RANY(obj)->as.scope.local_vars-1;
if (!(RANY(obj)->as.scope.flags & SCOPE_CLONE) && vars[0] == 0)
RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
- if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
+ if ((RANY(obj)->as.scope.flags & (SCOPE_MALLOC|SCOPE_CLONE)) == SCOPE_MALLOC)
RUBY_CRITICAL(free(vars));
}
break;