title: Ruby .times .upto .downto, etc. Offsetting the printed value
body: <p>Is there a way to offset the value that has been passed in the code block.</p>
  
  <p>For example</p>
  
  <p>C# - This will always print 5</p>
  
  <pre><code>for (int i = 0; i &lt; 10; i++)
  {
    i=5
    Console.WriteLine(i);
  }
  </code></pre>
  
  <p>Ruby - This will print 5 for only 10 times.</p>
  
  <pre><code>10.times do |i|
    i = 5
    puts i
  end
  </code></pre>
  
  <p>Is there a way to get |i| to get back to 5?</p>
  
  <p>and another question. How can you make .times block skip(not increasing by 1 all the time)</p>