From: "Thomas T." Date: 2010-12-29T08:40:20+09:00 Subject: Re: convert String "1;2;3;4;5;" to Array Ian M. Asaff wrote in post #971169: > you mean something like this? > "1;2;3;4;5;6;7;8;9;10".split(';').inject([]) { |a,i| a << i.to_i } > => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Ok, I've read the page on .inject, but do have a question on your solution. I'm interested in the [] where I read an initial value may be supplied in .inject([]). Is the [] initializing an empty array to which the accumulator, a, will populate? -- Posted via http://www.ruby-forum.com/.