title: Keep leading zeroes when converting string to integer
body: <p>For no particular reason, I am trying to add a #reverse method to the Integer class:</p>
  
  <pre><code>class Integer
      def reverse
          self.to_s.reverse.to_i
      end
  end
  
  puts 1337.reverse # =&gt; 7331
  puts 1000.reverse # =&gt; 1
  </code></pre>
  
  <p>This works fine except for numbers ending in a <code>0</code>, as shown when <code>1000.reverse</code> returns <code>1</code> rather than <code>0001</code>. Is there any way to keep leading zeroes when converting a string into an integer?</p>