From c27ef66dd7dc00fa22dce416dd2080f5da501a47 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 6 Feb 2007 06:50:40 +0000 Subject: * compile.c (iseq_compile_each): fix setting is_local flag. * yarvtest/test_class.rb: add a test for class local isntance variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 0329a0ef1d..fb584c4811 100644 --- a/compile.c +++ b/compile.c @@ -3325,7 +3325,7 @@ iseq_compile_each(yarv_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) } case NODE_IASGN: case NODE_IASGN2:{ - int is_local = (nd_type(node) == NODE_IVAR2) ? 1 : 0; + int is_local = (nd_type(node) == NODE_IASGN2) ? 1 : 0; COMPILE(ret, "lvalue", node->nd_value); if (!poped) { ADD_INSN(ret, nd_line(node), dup); -- cgit v1.2.3