title: Split string by spaces into an array
body: <p>I want to have a user type some words, and get them converted to an array. I want to split by word. Here is an example:</p>
  
  <p><code>"15 17 21 46"</code> → <code>[15, 17, 21, 46]</code></p>
  
  <p>Stuff like <code>split("")</code> and <code>scan</code> make an array out of every single letter.</p>
  
  <p>I would prefer doing it without using YAML. Also, take note in the example that it doesn't include the spaces but it uses those as breaks between values.</p>
  
  <p>Is it possible to do what I did in the example above where I have a bunch of numbers with spaces and those get converted directly to integers? I feel like the spaces might interrupt it in case I do something like <code>to_i</code>.</p>
  
  <p>This question is similar to <a href="https://stackoverflow.com/questions/16699717/string-to-array-in-ruby">String to Array in Ruby</a>, but it does not have an answer.</p>