title: Repeat an iteration of an array in ruby
body: <p>Consider I have a loop with a conditional inside, if the condition is true then the current iteration of the loop has to be repeated. For example, consider the following method. Read the note inside the if statement. </p>
  
  <pre><code>def func1(arr)
    size = arr.size - 1
    max = arr[size]
    0.upto(size) do |x|
      if (*boolean statement*)
        *repeat current iteration*
      end
    end
    func2(arr)
  end
  </code></pre>
  
  <p>How would I go about doing this? In case you are wondering why I need this is because I'm modifying the array such that if the conditional is true for a given x, then the element at index x is removed and placed at the end of the array. If the loop continues then it skips the element after x because this one now has the index of the one removed. In java this is done with the continue keyword I think, is there a ruby equivalent?</p>
  
  <p>Thanks!</p>