diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 05:22:17 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 05:22:17 +0000 |
commit | 42ce75cdff741d69927e407ac57b68dd58408111 (patch) | |
tree | 23c31bb9a51e489645b42457e69ac9a50fd5014d /yarvtest | |
parent | d4d5f27077dd356fb2bef031991864777cc54ef6 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@11639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvtest')
-rw-r--r-- | yarvtest/test_class.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/yarvtest/test_class.rb b/yarvtest/test_class.rb index 1eab39f0d5..488b3ccfd9 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
|