From: Liam Date: 2007-11-21T04:45:59+09:00 Subject: Re: save pp output to a string On Wed, Nov 21, 2007 at 03:50:06AM +0900, Oliver wrote: > hi, folks - > > how do I save the output from pp to a string for later use? require 'pp' x=[2,3,4] string="" PP.pp(x,string) puts string => [2, 3, 4] works for IO objects as well, or anything that supports <<. > > what I had hoped for is something like this: > > x= [2, 3,4] > res = eval "pp x" > > but that doesn't work. > > thanks for help > > Oliver >