[macruby-changes] [2336] MacRuby/trunk/test_vm/exception.rb

source_changes at macosforge.org source_changes at macosforge.org
Sun Aug 16 00:28:03 PDT 2009


Revision: 2336
          http://trac.macosforge.org/projects/ruby/changeset/2336
Author:   vincent.isambart at gmail.com
Date:     2009-08-16 00:27:59 -0700 (Sun, 16 Aug 2009)
Log Message:
-----------
added failing tests

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

Modified: MacRuby/trunk/test_vm/exception.rb
===================================================================
--- MacRuby/trunk/test_vm/exception.rb	2009-08-16 07:02:05 UTC (rev 2335)
+++ MacRuby/trunk/test_vm/exception.rb	2009-08-16 07:27:59 UTC (rev 2336)
@@ -283,3 +283,42 @@
   end
   p foo
 }
+
+assert ':ok', %{
+  class A < Exception; end
+  def foo
+    begin
+      raise 'foo'
+    rescue A
+    ensure
+      p :ok
+    end
+    p :ko
+  end
+  
+  begin
+    foo
+  rescue
+  end  
+}
+
+assert ':ok', %{
+  class A < Exception; end
+  def foo
+    begin
+      begin
+        raise 'foo'
+      rescue A
+      end
+      p :ko
+    ensure
+      p :ok
+    end
+    p :ko
+  end
+  
+  begin
+    foo
+  rescue
+  end
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090816/d11f43ce/attachment.html>


More information about the macruby-changes mailing list