From: Alex Young Date: 2007-04-05T02:42:04+09:00 Subject: Re: Problem Extracting Array Values Brian Candler wrote: > On Thu, Apr 05, 2007 at 01:05:44AM +0900, Dustin Anderson wrote: >> is there a simple way in ruby to build an array from a string like this: >> >> block1,block2,block3 to an array that is like this: >> >> ["block1", "block2", "block3"] > > I always thought that Object#inspect could be considered as a (crude) form > of object serialisation, and it would be really useful to have a reverse > "uninspect" operation to recreate the object from it again. Has anyone > written such a parser? > For the basic types, eval will do it to a tolerable degree. For everything else, there's YAML... -- Alex