bubblesort.rb revised