From c9b4b78085ee07fa6cae4a267fa5dff80d6351a4 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 10 Dec 2012 06:11:16 +0000 Subject: compile.c, vm_insnhelper.c: flip-flop without hidden string key * compile.c (iseq_compile_each): count flip-flop state in local iseq not in each iseqs, so that the keys can be other than hidden strings. [ruby-core:47253] [Bug #6899] * vm_insnhelper.c (lep_svar_get, lep_svar_set, vm_getspecial): store flip-flop states in an array instead of a hash. * iseq.c (set_relation): main iseq also can has local scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 42eba6eb25..78e33b0d96 100644 --- a/iseq.c +++ b/iseq.c @@ -231,6 +231,10 @@ set_relation(rb_iseq_t *iseq, const VALUE parent) GetISeqPtr(parent, piseq); iseq->parent_iseq = piseq; } + + if (type == ISEQ_TYPE_MAIN) { + iseq->local_iseq = iseq; + } } static VALUE -- cgit v1.2.3