Selection Sort using Ruby