var swimmers_to_enter = []
for swimmer in all_swimmers:
swimmers_to_enter.append([swimmer.name_swimmer,swimmer.time])
var test_event_object = SwimEvent.new(event_50_freestyle, swimmers_to_enter)
Edit: Actually, the problem is that you’re trying to do a non-sensical assignment. sort_custom() sorts the array instead of returning a new array. If you want to keep the unsorted array, you need to duplicate it before sorting.