title: Refactoring Ruby : Converting string array to int array
body: <p>I'm refactoring a checkers program, and I am trying to process a players move request (in the form of "3, 3, 5, 5" for example) into an int array. I have the following method, but it doesn't feel as Ruby-like as I know it could be:</p>
  
  <pre><code>def translate_move_request_to_coordinates(move_request)
      return_array = []
      coords_array = move_request.chomp.split(',')
      coords_array.each_with_index do |i, x|
        return_array[x] = i.to_i
      end
      return_array
    end
  </code></pre>
  
  <p>I have the following RSpec test with it.</p>
  
  <pre><code>it "translates a move request string into an array of coordinates" do
        player_input = "3, 3, 5, 5"
        translated_array = @game.translate_move_request_to_coordinates(player_input)
        translated_array.should == [3, 3, 5, 5]
      end 
  </code></pre>
  
  <p>The test passes, but I think the code is pretty ugly. Any help would be appreciated. Thanks.</p>
  
  <p>Steve</p>