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

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 23 17:56:59 PDT 2009


Revision: 2625
          http://trac.macosforge.org/projects/ruby/changeset/2625
Author:   lsansonetti at apple.com
Date:     2009-09-23 17:56:58 -0700 (Wed, 23 Sep 2009)
Log Message:
-----------
adding 2 tests (one is failing)

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

Modified: MacRuby/trunk/test_vm/ivar.rb
===================================================================
--- MacRuby/trunk/test_vm/ivar.rb	2009-09-23 22:50:16 UTC (rev 2624)
+++ MacRuby/trunk/test_vm/ivar.rb	2009-09-24 00:56:58 UTC (rev 2625)
@@ -94,3 +94,31 @@
   end
   Foo.new.foo
 }
+
+assert '42', %{
+  class Foo
+    def initialize
+      @foo=42
+    end
+    def foo
+      o = Object.new
+      self.addObserver(o, forKeyPath:'foo', options:0, context:nil)
+      p @foo
+    end
+  end
+  Foo.new.foo
+}
+
+assert '42', %{
+  class Foo
+    def initialize
+      @foo=42
+    end
+    def foo
+      o = Object.new
+      self.addObserver(o, forKeyPath:'foo', options:0, context:nil)
+      1.times { p @foo }
+    end
+  end
+  Foo.new.foo
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090923/09767780/attachment-0001.html>


More information about the macruby-changes mailing list