From: Ne Scripter Date: 2009-10-12T22:37:43+09:00 Subject: Re: Spliting hash using map! Solved. I went for string.include?(variable) Thanks > angico wrote: >> Hi, >> >> ------ >> On Monday 12 October 2009 07:14:57 Ne Scripter wrote: >> >>> individual items, I use map! (output = ID.map!{|str| str.split(/\s+/) >>> }.flatten!) to do this giving >>> 0001 >>> 000200030004 >>> 00050006 >> If you are to put the result of map in 'output' the you don't need map!, >> just >> map. You also don't need flatten!, just flatten. >> >> And, BTW, where does ID come from? What is ID, an array, a string? >> >> -- >> angico >> ------ -- Posted via http://www.ruby-forum.com/.