title: Ruby Split Integer Into Array
body: <p>I have this value <code>x = 876885</code> . I want to split that value into the array like <code>[876,885]</code></p>
  
  <p>This is what I tried </p>
  
  <pre><code>x.to_s[0..2].split(',') #=&gt; ["876"]
  </code></pre>
  
  <p>How can I get something like <code>[876,885]</code>? </p>