From 11ffee88b5a2ed67b4f181a48cf8eed772ae1c50 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 8 Feb 2024 09:42:51 -0500 Subject: [PATCH] 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. --- darray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/darray.h b/darray.h index 8e1e576355..bf3dd99542 100644 --- a/darray.h +++ b/darray.h @@ -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;