magnitude()
public
Returns the absolute value of int.
-12345.abs
12345.abs
-1234567890987654321.abs
VALUE
rb_int_abs(VALUE num)
{
if (FIXNUM_P(num)) {
return fix_abs(num);
}
else if (RB_TYPE_P(num, T_BIGNUM)) {
return rb_big_abs(num);
}
return Qnil;
}