title: Ruby: checking if a string can be converted to an integer
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1235863/test-if-a-string-is-basically-an-integer-in-quotes-using-ruby">Test if a string is basically an integer in quotes using Ruby?</a>  </p>
  </blockquote>
  
  
  
  <pre>
  "1"
  "one"
  </pre>
  
  <p>The first string is a number, and I can just say to_i to get an integer.<br>
  The second string is also a number, but I can't directly call to_i to get the desired number.</p>
  
  <p>How do I check whether I can successfully convert using to_i or not?</p>