<(p1)
public
Returns true if the value of fix is less than that of other.
Show source
static VALUE
fix_lt(VALUE x, VALUE y)
{
if (FIXNUM_P(y)) {
if (FIX2LONG(x) < FIX2LONG(y)) return Qtrue;
return Qfalse;
}
switch (TYPE(y)) {
case T_BIGNUM:
return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
case T_FLOAT:
return (double)FIX2LONG(x) < RFLOAT_VALUE(y) ? Qtrue : Qfalse;
default:
return rb_num_coerce_relop(x, y, '<');
}
}