a = ["11", "-2", "4"]b = a.map(&:to_i) p b
Standard input is empty
[11, -2, 4]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!