abs()
Returns the absolute value of int.
-12345.abs #=> 12345 12345.abs #=> 12345 -1234567890987654321.abs #=> 1234567890987654321
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; }