[macruby-changes] [1809] MacRuby/branches/experimental/test_vm/dispatch.rb

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 8 18:07:13 PDT 2009


Revision: 1809
          http://trac.macosforge.org/projects/ruby/changeset/1809
Author:   lsansonetti at apple.com
Date:     2009-06-08 18:07:13 -0700 (Mon, 08 Jun 2009)
Log Message:
-----------
added 2 method_missing tests (one fails)

Modified Paths:
--------------
    MacRuby/branches/experimental/test_vm/dispatch.rb

Modified: MacRuby/branches/experimental/test_vm/dispatch.rb
===================================================================
--- MacRuby/branches/experimental/test_vm/dispatch.rb	2009-06-08 22:10:20 UTC (rev 1808)
+++ MacRuby/branches/experimental/test_vm/dispatch.rb	2009-06-09 01:07:13 UTC (rev 1809)
@@ -297,3 +297,21 @@
   end
   p foo(1,2,3)
 }
+
+assert ':ok', %{
+  class X
+    def method_missing(x, *args)
+      p :ok if x == :foo
+    end
+  end
+  X.new.foo
+}
+
+assert ':ok', %{
+  class X
+    def method_missing(x, *args)
+      p :ok if x == :foo and args == [42]
+    end
+  end
+  X.new.foo(42)
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090608/8d18db08/attachment.html>


More information about the macruby-changes mailing list