summaryrefslogtreecommitdiff
path: root/darray.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-02-08 09:42:51 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-02-12 15:07:47 -0500
commit11ffee88b5a2ed67b4f181a48cf8eed772ae1c50 (patch)
treefdb6ed7e50465fd4f2d52082829268d10e2394d3 /darray.h
parent7256e38f867d88818d33a63f6704a02936929083 (diff)
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.
Diffstat (limited to 'darray.h')
-rw-r--r--darray.h2
1 files changed, 1 insertions, 1 deletions
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;