Revision
1506
Author
vincent.isambart@gmail.com
Date
2009-04-30 03:54:05 -0700 (Thu, 30 Apr 2009)

Log Message

added failing tests

Modified Paths

Diff

Modified: MacRuby/branches/experimental/test_vm/block.rb (1505 => 1506)


--- 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"