diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-03 07:30:46 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-03 07:30:46 +0000 |
commit | da9117c9de204ae56e7ea7db9fd050eb3191d6ff (patch) | |
tree | 920911b0e59a279789c19352d14642dbd968c30e /parse.y | |
parent | ff18a5d9ed434bb0c9c68f492e2462a70b1fced6 (diff) |
* env.h (SCOPE_CLONE): Introduce a new scope flag to prevent a
local_tbl region from getting freed many times; submitted by
Chikanaga Tomoyuki <chikanag AT nippon-control-system.co.jp> in
[ruby-dev:30460].
* eval.c (proc_invoke): Ditto.
* gc.c (obj_free): Ditto.
* parse.y (top_local_setup_gen): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5727,7 +5727,8 @@ top_local_setup() rb_mem_clear(ruby_scope->local_vars+i, len-i); } if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) { - xfree(ruby_scope->local_tbl); + if (!(ruby_scope->flags & SCOPE_CLONE)) + xfree(ruby_scope->local_tbl); } ruby_scope->local_tbl = local_tbl(); } |