[macruby-changes] [950] MacRuby/branches/experimental/test_roxor.rb

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 16 22:29:47 PDT 2009


Revision: 950
          http://trac.macosforge.org/projects/ruby/changeset/950
Author:   lsansonetti at apple.com
Date:     2009-03-16 22:29:46 -0700 (Mon, 16 Mar 2009)
Log Message:
-----------
added more tests about const lookup (2 of them current fail)

Modified Paths:
--------------
    MacRuby/branches/experimental/test_roxor.rb

Modified: MacRuby/branches/experimental/test_roxor.rb
===================================================================
--- MacRuby/branches/experimental/test_roxor.rb	2009-03-17 05:16:30 UTC (rev 949)
+++ MacRuby/branches/experimental/test_roxor.rb	2009-03-17 05:29:46 UTC (rev 950)
@@ -331,6 +331,29 @@
     end
   }
 
+  assert '42', %q{
+    class X
+      FOO = 42
+      class Y; def foo; FOO; end; end
+    end
+    p X::Y.new.foo
+  }
+
+  assert '42', %q{
+    class X; FOO = 42; end
+    class Y < X; def foo; FOO; end; end
+    p Y.new.foo
+  }
+
+  assert '42', %q{
+    class X; FOO = 123; end
+    class Z
+      FOO = 42
+      class Y < X; def foo; FOO; end; end
+    end
+    p Z::Y.foo
+  }
+
 end
 
 test "ranges" do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090316/032dd5fc/attachment.html>


More information about the macruby-changes mailing list