implemented a stooge sort in ruby