I would a more ruby pattern to do a reject / map here instead of using compact.  Such as

```ruby
players.reject { |player| player == name }.map{ |player| players.index(player) }
```