summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-02-08 09:44:44 -0500
committerPeter Zhu <[email protected]>2024-02-12 15:07:47 -0500
commit3ed5962755603c86a5f783879425d1e5fb96e5bb (patch)
treec92e93c0aab6cbcc0ee275eda0e72eaf278fc8a7 /range.c
parentfd87259a26df493d61923a202765fb21c13b7669 (diff)
Replace assert with RUBY_ASSERT in range.c
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 'range.c')
-rw-r--r--range.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/range.c b/range.c
index 51da98e51d..af4706f875 100644
--- a/range.c
+++ b/range.c
@@ -1266,11 +1266,11 @@ rb_int_range_last(int argc, VALUE *argv, VALUE range)
int x;
long n;
- assert(argc > 0);
+ RUBY_ASSERT(argc > 0);
b = RANGE_BEG(range);
e = RANGE_END(range);
- assert(RB_INTEGER_TYPE_P(b) && RB_INTEGER_TYPE_P(e));
+ RUBY_ASSERT(RB_INTEGER_TYPE_P(b) && RB_INTEGER_TYPE_P(e));
x = EXCL(range);