[macruby-changes] [3131] MacRuby/trunk/test_vm/ivar.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu Dec 17 18:23:09 PST 2009


Revision: 3131
          http://trac.macosforge.org/projects/ruby/changeset/3131
Author:   lsansonetti at apple.com
Date:     2009-12-17 18:23:05 -0800 (Thu, 17 Dec 2009)
Log Message:
-----------
added failing test (based on #499)

Modified Paths:
--------------
    MacRuby/trunk/test_vm/ivar.rb

Modified: MacRuby/trunk/test_vm/ivar.rb
===================================================================
--- MacRuby/trunk/test_vm/ivar.rb	2009-12-18 01:55:13 UTC (rev 3130)
+++ MacRuby/trunk/test_vm/ivar.rb	2009-12-18 02:23:05 UTC (rev 3131)
@@ -122,3 +122,22 @@
   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
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091217/b7ad6620/attachment.html>


More information about the macruby-changes mailing list