title: Leading zero and increment in ruby
body: <p>I was looking on how to have a leading zero in ruby, and I found out the solution: use %02d"
  Now, I'd like to do a loop, and keep this zero !
  When I do something like this</p>
  
  <pre><code>i = "%02d" % "1".to_i
  until (i == 10)
    puts i
    i += 1
  end
  </code></pre>
  
  <p>I have an error "Cannot convert FixNum to string".
  So I decide to do this</p>
  
  <pre><code>i = "%02d" % "1".to_i
  "01"
  until (i == 10)
    puts i
    i = i.to_i
    i += 1
  end
  </code></pre>
  
  <p>So, this time, the loop work, but only the first number have the leading 0.
  I ran out of idea, so I'd appreciate a little help !</p>