Refactor while loop with negative condition.

Favor `until` over `while` for negative conditions and Favor modifier `while/until` usage when you have a single-line body. https://github.com/bbatsov/ruby-style-guide#syntax
Merge pull request #751 from oblakeerickson/master

Refactor while loop with negative condition.