quicksort implementation in ruby