icps

notes

Sort_nil

1
2
3
4
5
s = [1, 0, 2, nil, 3]


# sort index
p s.map{|i|i == nil ? 1.0/0.0 : i}.map.with_index.sort.map(&:last)