title: Does Ruby recalculate array size every time when you call `array.size`?
body: <p>Could someone provide some proofs, whether Ruby recalculates array size every time when you call <code>array.size</code>, <code>array.length</code> or <code>array.count</code>?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Update</strong></p>
  
  <p>To make things clearer, by <code>recalculate</code> I mean, whether Ruby needs to loop through the whole array again and again to calculate the number of its elements every time when we call <code>array.size</code>.</p>