summaryrefslogtreecommitdiff
path: root/yarvtest
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-06 06:50:40 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-06 06:50:40 +0000
commitc27ef66dd7dc00fa22dce416dd2080f5da501a47 (patch)
treeb009347de3cc64e15b080506249a52e6db7a7b2b /yarvtest
parent42ce75cdff741d69927e407ac57b68dd58408111 (diff)
* 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
Diffstat (limited to 'yarvtest')
-rw-r--r--yarvtest/test_class.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/yarvtest/test_class.rb b/yarvtest/test_class.rb
index 488b3ccfd9..43d3e3aa55 100644
--- a/yarvtest/test_class.rb
+++ b/yarvtest/test_class.rb
@@ -754,6 +754,27 @@ class TestClass < YarvTestBase
ae %q{
class C
def initialize
+ @_v = 1
+ end
+
+ def foo
+ @_v
+ end
+ end
+ class D < C
+ def initialize
+ @_v = 2
+ super
+ end
+ def foo
+ [@_v, super]
+ end
+ end
+ D.new.foo
+ }
+ ae %q{
+ class C
+ def initialize
@_c = 1
end
end