John Labovitz <johnl / johnlabovitz.com> wrote:

Additional note: it's probably better to use #scan instead of split because 
then you can make sure to only get the numbers:

a = readlines.map {|line| line.scan(/\d+/).map! {|s| s.to_i}}

Kind regards

    robert