[macruby-changes] [1506] MacRuby/branches/experimental/test_vm/block.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 30 03:54:06 PDT 2009


Revision: 1506
          http://trac.macosforge.org/projects/ruby/changeset/1506
Author:   vincent.isambart at gmail.com
Date:     2009-04-30 03:54:05 -0700 (Thu, 30 Apr 2009)
Log Message:
-----------
added failing tests

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

Modified: MacRuby/branches/experimental/test_vm/block.rb
===================================================================
--- MacRuby/branches/experimental/test_vm/block.rb	2009-04-29 07:04:30 UTC (rev 1505)
+++ MacRuby/branches/experimental/test_vm/block.rb	2009-04-30 10:54:05 UTC (rev 1506)
@@ -307,5 +307,29 @@
   p f.call
 }
 
+assert ":ok", %{
+  def f()
+    2.times do
+      begin
+        yield
+      rescue
+      end
+    end
+  end
+  f { raise 'a' }
+  p :ok
+}
+
+assert ":ok", %{
+  def f()
+    2.times do
+      catch(:a) do
+        yield
+      end
+    end
+  end
+  f { throw :a }
+  p :ok
+}
 # Enumerator 
 assert "[\"f\", \"o\", \"o\"]", "p 'foo'.chars.to_a"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090430/402b6ec1/attachment.html>


More information about the macruby-changes mailing list