mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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.
This commit is contained in:
parent
fd87259a26
commit
3ed5962755
1 changed files with 2 additions and 2 deletions
4
range.c
4
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue