From: Gavin Sinclair Date: 2004-11-25T21:58:53+09:00 Subject: Re: prettyprint or pp questions On Thursday, November 25, 2004, 10:37:16 PM, Hal wrote: > There are three things I would like to do but I am not > sure how: > 2. Retrieve the text without printing it (analogous to #inspect): > str = obj.pretty # or whatever require 'extensions/object' str = obj.pp_s > 1. Redirect the output to another IO -- something like > STDERR.pp obj STDERR.puts obj.pp_s Cheers, Gavin P.S. It seems to me that all the questions you're asking should be more elegantly solved by the 'pp' library. That it, it should all "just work".