title: Until loop-- why doesn't it exit immediately?
body: <p>Question: with the first line in the "until" loop, we set the boolean, sorted, to true. Why does the loop even run after this line? Also why can we not put sorted = true after the .times do loop (to close the until sorted loop) and achieve the same result?</p>
  
  <pre><code>def bubble_sort(arr)
    len = arr.length
    sorted = false
    until sorted
      sorted = true
      (len-1).times do |i|
        if arr[i] &gt; arr[i+1]
          arr[i],arr[i+1] = arr[i+1],arr[i]
          sorted = false
        end
      end
    end
    arr
  end
  </code></pre>
  
  <p>Thanks in advance!</p>