Alex Moreno wrote:
> using like a simple array worked like a charm, thanks a lot :-D
> 
> I can't believe it was so simple :-):
> 
> 
>     cont = 0
>     queryArray.each{ |q|
>       cadarray.concat( ["%#{queryArray[cont]}%"] )
>       cont +=1
>     }
> 
> Thanks again.

No problem. Now, the original posting asked how to make it less ugly. 
The above could be replaced with a single line:

  cadarray += queryArray.map { |e| "%#{e}%" }

or

  cadarray.concat queryArray.map { |e| "%#{e}%" }

HTH,

Brian.
-- 
Posted via http://www.ruby-forum.com/.