title: Converting string into an array
body: <p>I have a string:   </p>
  
  <pre><code>key = "41521"
  </code></pre>
  
  <p>And I want to convert it into an array like this:</p>
  
  <pre><code>array = [41, 15, 52, 21]
  </code></pre>
  
  <p>I went about it like so:</p>
  
  <pre><code>array = []
  array &lt;&lt; key[0..1].to_i
  array &lt;&lt; key[1..2].to_i
  array &lt;&lt; key[2..3].to_i
  array &lt;&lt; key[3..4].to_i
  </code></pre>
  
  <p>What would be a better way?</p>