From: Farrel Lifson Date: 2006-10-19T22:37:58+09:00 Subject: Re: iterator inside string On 19/10/06, akbarhome wrote: > Hi, > > This is the code: > a = [ 'a', 'b' ] > b = 2 > stringbla = "home #{ a.each {|i| i * b } } work" > puts stringbla > > output: > home ab work > > How do I modifiy the iterator so the output will be: > home aabb work > > Thank you. stringbla = "home #{ a.map {|i| i * b } } work" Farrel