fix.size → fixnum
Returns the number of bytes in the machine representation of a Fixnum.
1.size #=> 4 -1.size #=> 4 2147483647.size #=> 4
Source Code
/* * call-seq: * fix.size -> fixnum * * Returns the number of <em>bytes</em> in the machine representation * of a <code>Fixnum</code>. * * 1.size #=> 4 * -1.size #=> 4 * 2147483647.size #=> 4 */ static VALUE fix_size(fix) VALUE fix; { return INT2FIX(sizeof(long)); }
<code/>and<pre/>for code samples.