size()
public
Returns the number of bytes in the machine representation of int
(machine dependent).
1.size
-1.size
2147483647.size
(256**10 - 1).size
(256**20 - 1).size
(256**40 - 1).size
static VALUE
int_size(VALUE num)
{
if (FIXNUM_P(num)) {
return fix_size(num);
}
else if (RB_TYPE_P(num, T_BIGNUM)) {
return rb_big_size_m(num);
}
return Qnil;
}