use pre-allocated RuntimeError for out-of-memory

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-06-04 11:33:15 +09:00
parent b01bb33b75
commit d62ce565c6
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ mrb_realloc(mrb_state *mrb, void *p, size_t len)
}
else {
mrb->out_of_memory = TRUE;
mrb_raise(mrb, E_RUNTIME_ERROR, "Out of memory");
mrb_exc_raise(mrb, mrb_obj_value(mrb->nomem_err));
}
}
else {