Compacted Ruby bubble-sort algorithm

Hope it helps! :palm_tree: