basic bubble sort implementation in ruby