cb = [] inval = 10.times.to_awhile !inval.empty? val = inval.shift cb << lambda{ val }end puts cb.map(&:call)
Standard input is empty
9 9 9 9 9 9 9 9 9 9
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!