diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-07 03:42:30 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-07 03:42:30 +0000 |
commit | 6b3928d0693958a09748f308eadcdd9eb4bbfdf8 (patch) | |
tree | b0505379dee222d8842c292099e1017ef59c97c8 /parse.y | |
parent | dd4572c75cf1cf00cc1e3a7cd04df500de1da815 (diff) |
* parse.y (top_local_setup): local_vars[-1] should point
ruby_scope itself to protect local_tbl from garbage collection.
[ruby-dev:29049]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5717,7 +5717,7 @@ top_local_setup() rb_mem_clear(vars+i, len-i); } else { - *vars++ = 0; + *vars++ = (VALUE)ruby_scope; rb_mem_clear(vars, len); } ruby_scope->local_vars = vars; @@ -5732,7 +5732,6 @@ top_local_setup() if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) { xfree(ruby_scope->local_tbl); } - ruby_scope->local_vars[-1] = 0; ruby_scope->local_tbl = local_tbl(); } } |