Bubble sort in ruby.