./types/rbobject13.html?swift"><code>RbObject</code></a>.</p>
<p>It fails if the Ruby value:</p>
<ol>
<li>Is numeric and negative; or</li>
<li>Is numeric, positive, and does not fit into the Swift type; or</li>
<li>Cannot be made into a suitable numeric via <code>to_int</code> or <code>to_i</code>.</li>
</ol>
<p>See <a href="../types/rberror.html?swift#history1"><code>RbError.history</code></a> to find out why a conversion failed.</p>
<p>If the Ruby value is floating-point then the integer part is used.</p>