On Mon, Nov 1, 2010 at 6:54 AM, wroxdb <> wrote:
> how to dump a complicated data structure with ruby?
>
> I wrote:
>
> p data
>
> or:
>
> puts data.inspect
>
> They didn't work nice.
Alternatively to YAML, JSON (in Ruby 1.9: require "json";
data.to_json) could work, too.
--
Phillip Gawlowski
Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.
Phillip Gawlowski
Brian Candler
Guest
Posts: n/a
11-02-2010
Phillip Gawlowski wrote in post #958458:
> On Mon, Nov 1, 2010 at 6:54 AM, wroxdb <> wrote:
>> They didn't work nice.
> Alternatively to YAML, JSON (in Ruby 1.9: require "json";
> data.to_json) could work, too.
There is also pp / prettyprint in the standard library.
> Phillip Gawlowski wrote in post #958458:
>> On Mon, Nov 1, 2010 at 6:54 AM, wroxdb <> wrote:
>>> They didn't work nice.
>> Alternatively to YAML, JSON (in Ruby 1.9: require "json";
>> data.to_json) could work, too.
>=20
> There is also pp / prettyprint in the standard library.
>=20
> --=20
> Posted via http://www.ruby-forum.com/.
>=20