[macruby-changes] [2496] MacRuby/trunk/test_vm/dispatch.rb

source_changes at macosforge.org source_changes at macosforge.org
Sat Sep 5 12:42:47 PDT 2009


Revision: 2496
          http://trac.macosforge.org/projects/ruby/changeset/2496
Author:   lsansonetti at apple.com
Date:     2009-09-05 12:42:47 -0700 (Sat, 05 Sep 2009)
Log Message:
-----------
adding failing test (based on #326)

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

Modified: MacRuby/trunk/test_vm/dispatch.rb
===================================================================
--- MacRuby/trunk/test_vm/dispatch.rb	2009-09-05 16:34:13 UTC (rev 2495)
+++ MacRuby/trunk/test_vm/dispatch.rb	2009-09-05 19:42:47 UTC (rev 2496)
@@ -298,6 +298,21 @@
   p X.new.foo
 }
 
+assert "42\n42\n42\n42", %{
+  module M
+    def foo(*args); 42; end
+    module_function :foo
+
+    module_function
+    def bar(*args); 42; end
+  end
+
+  p M.foo
+  p M.foo('blah')
+  p M.bar
+  p M.bar('blah')
+}
+
 assert '42', %{
   def foo(x,y,z=42)
     return z if z == 42
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090905/1e0ed448/attachment.html>


More information about the macruby-changes mailing list