Replace assert with RUBY_ASSERT in darray.h

assert does not print the bug report, only the file and line number of
the assertion that failed. RUBY_ASSERT prints the full bug report, which
makes it much easier to debug.
This commit is contained in:
Peter Zhu 2024-02-08 09:42:51 -05:00
parent 7256e38f86
commit 11ffee88b5

View File

@ -196,7 +196,7 @@ rb_darray_resize_capa_impl(void *ptr_to_ary, size_t new_capa, size_t header_size
new_ary->size = 0;
}
assert(new_ary->size <= new_capa);
RUBY_ASSERT(new_ary->size <= new_capa);
new_ary->capa = new_capa;