From: Julian Tarkhanov Date: 2007-01-28T19:24:52+09:00 Subject: Re: string into array On Jan 28, 2007, at 11:15 AM, Josselin wrote: > I have the following string > id = "(48.88689971942316, 2.3380279541015625)" > is there any method to transform directly into an array > [48.88689971942316, 2.3380279541015625] or should extract both > parts and create the array (what I did.. but not very DRY) > > tfyl id[1..-2].split(',').map {|e| e.to_f } -- Julian 'Julik' Tarkhanov please send all personal mail to me at julik.nl