[macruby-changes] [3293] MacRuby/trunk/eval_jump.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 18 14:55:14 PST 2010
Revision: 3293
http://trac.macosforge.org/projects/ruby/changeset/3293
Author: lsansonetti at apple.com
Date: 2010-01-18 14:55:13 -0800 (Mon, 18 Jan 2010)
Log Message:
-----------
call at_exit blocks within exception handlers
Modified Paths:
--------------
MacRuby/trunk/eval_jump.c
Modified: MacRuby/trunk/eval_jump.c
===================================================================
--- MacRuby/trunk/eval_jump.c 2010-01-18 19:56:55 UTC (rev 3292)
+++ MacRuby/trunk/eval_jump.c 2010-01-18 22:55:13 UTC (rev 3293)
@@ -40,6 +40,19 @@
return proc;
}
+static VALUE
+rb_end_proc_call_try(VALUE proc)
+{
+ return rb_proc_call2(proc, 0, NULL);
+}
+
+static VALUE
+rb_end_proc_call_catch(VALUE data)
+{
+ rb_vm_print_current_exception();
+ return Qnil;
+}
+
void
rb_exec_end_proc(void)
{
@@ -48,7 +61,7 @@
if (count > 0) {
VALUE proc = RARRAY_AT(at_exit_procs, count - 1);
rb_ary_delete_at(at_exit_procs, count - 1);
- rb_proc_call2(proc, 0, NULL);
+ rb_rescue(rb_end_proc_call_try, proc, rb_end_proc_call_catch, 0);
continue;
}
break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100118/ad9153f3/attachment.html>
More information about the macruby-changes
mailing list