Skip to content

Commit

Permalink
added failing test (based on #499)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3131 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Dec 18, 2009
1 parent 04bce57 commit 2157deb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test_vm/ivar.rb
Expand Up @@ -122,3 +122,22 @@ def foo
end
Foo.new.foo
}

assert "2\n2", %{
class X; end
class Y < X
def set_foo; @foo = 1; end
end
class X
def set_bar; @bar = 2; end
def bar; @bar; end
end
class Z < Y
def set_foo; @foo = 3; end
end
o = Z.new
o.set_bar
p o.bar
o.set_foo
p o.bar
}

0 comments on commit 2157deb

Please sign in to comment.