fork download
  1. cb = []
  2.  
  3. inval = 10.times.to_a
  4. while !inval.empty?
  5. val = inval.shift
  6. cb << lambda{ val }
  7. end
  8.  
  9. puts cb.map(&:call)
Success #stdin #stdout 0.06s 9608KB
stdin
Standard input is empty
stdout
9
9
9
9
9
9
9
9
9
9