eql?(p1)
public
Returns true if num and numeric are the same
type and have equal values.
1 == 1.0
1.eql?(1.0)
(1.0).eql?(1.0)
Show source
/*
* call-seq:
* num.eql?(numeric) => true or false
*
* Returns <code>true</code> if <i>num</i> and <i>numeric</i> are the
* same type and have equal values.
*
* 1 == 1.0
* 1.eql?(1.0)
* (1.0).eql?(1.0)
*/
static VALUE
num_eql(x, y)
VALUE x, y;
{
if (TYPE(x) != TYPE(y)) return Qfalse;
return rb_equal(x, y);
}