fork(7) download
  1. arr = ['x', 'o', 'x', '.', '.', 'o', 'x']
  2. p arr.each_index.select{|i| arr[i] == 'x'}
Success #stdin #stdout 0.01s 7452KB
stdin
Standard input is empty
stdout
[0, 2, 6]