Commit 5b0f900f authored by take_cheeze's avatar take_cheeze

Remove unnecessary out of memory check in `ary_expand_capa`.

Since `mrb_realloc` raises when failed to allocate memory.
parent 5c50bcd2
......@@ -200,10 +200,6 @@ ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
if (capa > a->aux.capa) {
mrb_value *expanded_ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*capa);
if (!expanded_ptr) {
mrb_raise(mrb, E_RUNTIME_ERROR, "out of memory");
}
a->aux.capa = capa;
a->ptr = expanded_ptr;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment