summaryrefslogtreecommitdiffstats
path: root/yarvtest
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-06 05:22:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-06 05:22:17 +0000
commit6b595b26af59f90e2a6fca9a33a14904e58799f5 (patch)
tree23c31bb9a51e489645b42457e69ac9a50fd5014d /yarvtest
parent4452f448ce7c78fefbc8d7ea89adf4e24c8a8880 (diff)
downloadruby-6b595b26af59f90e2a6fca9a33a14904e58799f5.tar.gz
ruby-6b595b26af59f90e2a6fca9a33a14904e58799f5.tar.xz
ruby-6b595b26af59f90e2a6fca9a33a14904e58799f5.zip
* compile.c, insns.def: remove (get|set)instancevariable2 and add a
operand is_local to (get|set)instancevariable. * yarvtest/test_class.rb: add a test for class local instance variable. * parse.y (rb_decompose_ivar2): remove unused variable oid. * tool/insns2vm.rb: remove needless require. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvtest')
-rw-r--r--yarvtest/test_class.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/yarvtest/test_class.rb b/yarvtest/test_class.rb
index 1eab39f0d..488b3ccfd 100644
--- a/yarvtest/test_class.rb
+++ b/yarvtest/test_class.rb
@@ -749,5 +749,24 @@ class TestClass < YarvTestBase
:ok
}
end
+
+ def test_ivar2
+ ae %q{
+ class C
+ def initialize
+ @_c = 1
+ end
+ end
+
+ class D < C
+ def initialize
+ super
+ @_d = 2
+ end
+ end
+
+ D.new.instance_variables
+ }
+ end
end