Merge branch 'master' of github.com:mruby/mruby

This commit is contained in:
Yukihiro Matsumoto
2012-05-06 00:18:46 +09:00
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -522,6 +522,7 @@ mrb_mod_include(mrb_state *mrb, mrb_value klass)
mrb_value mod;
mrb_get_args(mrb, "o", &mod);
mrb_check_type(mrb, mod, MRB_TT_MODULE);
mrb_include_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod));
return mod;
}
+2 -1
View File
@@ -268,7 +268,7 @@ localjump_error(mrb_state *mrb, const char *kind)
mrb_value exc;
snprintf(buf, 256, "unexpected %s", kind);
exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, buf, sizeof(buf));
exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, buf, strlen(buf));
mrb->exc = mrb_object(exc);
}
@@ -992,6 +992,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
case OP_R_RETURN:
if (proc->env->cioff < 0) {
localjump_error(mrb, "return");
goto L_RAISE;
}
ci = mrb->ci = mrb->cibase + proc->env->cioff;
break;