Remove redundant check in rb_obj_cmp()
* rb_equal() already checks using `obj1 == obj2`.
This commit is contained in:
parent
86391a5517
commit
00a9d697a8
2
object.c
2
object.c
@ -1726,7 +1726,7 @@ rb_obj_not_match(VALUE obj1, VALUE obj2)
|
|||||||
static VALUE
|
static VALUE
|
||||||
rb_obj_cmp(VALUE obj1, VALUE obj2)
|
rb_obj_cmp(VALUE obj1, VALUE obj2)
|
||||||
{
|
{
|
||||||
if (obj1 == obj2 || rb_equal(obj1, obj2))
|
if (rb_equal(obj1, obj2))
|
||||||
return INT2FIX(0);
|
return INT2FIX(0);
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user