title: Easiest way to determine sizeof( double ) and sizeof( int ) from Ruby?
body: <p>For unpacking complex binary strings with mixed doubles and integers using Ruby's <a href="http://ruby-doc.org/core/classes/String.html#M001112" rel="nofollow">String.unpack</a> I need to determine offsets within the binary string. Commonly, doubles are 8 bytes and integers are 4 bytes, but in order to make my code machine-independent, I would like to query these sizes from within my Ruby code.</p>
  
  <p>What is the easiest way to determine the size of integers and doubles from within Ruby, i.e., request the response of a request to C's <code>sizeof( type )</code> method?</p>