Method: Integer#+
- Defined in:
- numeric.c
permalink #+(numeric) ⇒ Object
Performs addition: the class of the resulting object depends on the class of numeric
.
3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 |
# File 'numeric.c', line 3596
VALUE
rb_int_plus(VALUE x, VALUE y)
{
if (FIXNUM_P(x)) {
return fix_plus(x, y);
}
else if (RB_TYPE_P(x, T_BIGNUM)) {
return rb_big_plus(x, y);
}
return rb_num_coerce_bin(x, y, '+');
}
|