Hi,
pp foo # pretty prints foo to stdout
But I want to print to a string, which I'll then be handling in rails.
I tried the following and output still went to the Mongrel log (stdout)
Any help would be most appreciated.
Thanks,
Larry
···
~~~~~~~~~
s = StringIO.new
pp(fields, s)
s.rewind
s.read # Should be the output of pretty print, but = '' instead
--
Posted via http://www.ruby-forum.com/.