eql?(p1)
public
Returns true if num and numeric are the same
type and have equal values. Contrast this with Numeric#==, which performs
type conversions.
1 == 1.0
1.eql?(1.0)
1.0.eql?(1.0)
Show source
static VALUE
num_eql(VALUE x, VALUE y)
{
if (TYPE(x) != TYPE(y)) return Qfalse;
if (RB_TYPE_P(x, T_BIGNUM)) {
return rb_big_eql(x, y);
}
return rb_equal(x, y);
}