Topic: a question in converting a string array to int array (SmallNum)?

That doesn't work at all :
str = str.each { |i| i.to_i } # str is the array of strings
any suggestions please?

Re: a question in converting a string array to int array (SmallNum)?

Because of this: in block you get a copy of each string in array and then you simply convert it to integer. str.each in your case returns initial array of strings. If you want to convert this array you should make something like this:

str = str.map { |i| i.to_i }

or

str.map! { |i| i.to_i }