[macruby-changes] [2337] MacRuby/trunk/test_vm/exception.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sun Aug 16 01:14:11 PDT 2009
Revision: 2337
http://trac.macosforge.org/projects/ruby/changeset/2337
Author: vincent.isambart at gmail.com
Date: 2009-08-16 01:14:08 -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:27:59 UTC (rev 2336)
+++ MacRuby/trunk/test_vm/exception.rb 2009-08-16 08:14:08 UTC (rev 2337)
@@ -322,3 +322,41 @@
rescue
end
}
+
+assert "1\n2", %{
+ class A < Exception; end
+ class B < Exception; end
+ begin
+ begin
+ begin
+ raise A.new
+ rescue B
+ p :ko1
+ end
+ p :ko2
+ rescue B
+ p :ko3
+ end
+ p :ko4
+ rescue A
+ p 1
+ ensure
+ p 2
+ end
+}
+
+assert ":ok", %{
+ class A < Exception; end
+ class B < Exception; end
+
+ begin
+ begin
+ raise B.new
+ rescue A
+ p :ko
+ end
+ p :ko
+ rescue B
+ p :ok
+ end
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090816/3a88eedb/attachment.html>
More information about the macruby-changes
mailing list