Modified: MacRuby/trunk/load.c (3372 => 3373)
--- MacRuby/trunk/load.c 2010-01-30 01:31:55 UTC (rev 3372)
+++ MacRuby/trunk/load.c 2010-01-30 01:32:31 UTC (rev 3373)
@@ -87,6 +87,7 @@
// Load it.
const char *fname_str = RSTRING_PTR(fname);
+//printf("load %s\n", fname_str);
NODE *node = (NODE *)rb_load_file(fname_str);
if (node == NULL) {
rb_raise(rb_eSyntaxError, "compile error");
@@ -251,10 +252,10 @@
}
static VALUE
-load_rescue(VALUE path)
+load_rescue(VALUE path, VALUE exc)
{
rb_remove_feature(path);
- rb_exc_raise(rb_vm_current_exception());
+ rb_exc_raise(exc);
return Qnil;
}
@@ -282,7 +283,8 @@
rb_provide_feature(path);
switch (type) {
case TYPE_RB:
- rb_rescue(load_try, path, load_rescue, path);
+ rb_rescue2(load_try, path, load_rescue, path,
+ rb_eException, 0);
break;
case TYPE_RBO: