mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Merge c750afd80c
into c30d900547
This commit is contained in:
commit
00cb161ccf
1 changed files with 4 additions and 5 deletions
9
range.c
9
range.c
|
@ -199,11 +199,10 @@ range_eq(VALUE range, VALUE obj)
|
||||||
static int
|
static int
|
||||||
r_less(VALUE a, VALUE b)
|
r_less(VALUE a, VALUE b)
|
||||||
{
|
{
|
||||||
VALUE r = rb_funcall(a, id_cmp, 1, b);
|
VALUE r;
|
||||||
|
#define rb_cmpint(cmp, a, b) (NIL_P(r = (cmp)) ? INT_MAX : rb_cmpint(r, (a), (b)))
|
||||||
if (NIL_P(r))
|
return OPTIMIZED_CMP(a, b);
|
||||||
return INT_MAX;
|
#undef rb_cmpint
|
||||||
return rb_cmpint(r, a, b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue