Revision
2882
Author
eloy.de.enige@gmail.com
Date
2009-10-22 04:27:47 -0700 (Thu, 22 Oct 2009)

Log Message

Added failing test_vm test about allowing a protected method to be called with `send'.

Modified Paths

Diff

Modified: MacRuby/trunk/test_vm/dispatch.rb (2881 => 2882)


--- MacRuby/trunk/test_vm/dispatch.rb	2009-10-22 00:36:39 UTC (rev 2881)
+++ MacRuby/trunk/test_vm/dispatch.rb	2009-10-22 11:27:47 UTC (rev 2882)
@@ -89,6 +89,18 @@
   end
 }
 
+assert ':ok', %{
+  class X
+    def method_missing(x, *args, &block)
+      p :ok if x == :foo and block.call == 42
+    end
+    
+    protected
+    def foo; end
+  end
+  X.new.send(:foo) { 42 }
+}
+
 assert "42", "def foo; return 42; end; p foo"
 assert "42", "def foo(x); if x; return 42; end; end; p foo(true)"
 assert "42", "def foo(x); if x; x += 2; return x; end; end; p foo(40)"