From: Meinrad Recheis Date: 2006-06-10T20:44:55+09:00 Subject: Re: [Fun] self nesting array [[...]] On 6/10/06, Florian Gro� wrote: > Meinrad Recheis wrote: > > >>> require "yaml" > > => true > >>> a.to_yaml > > => "--- !ruby/object:Array {}" > >>> s=a.to_yaml > > => "--- !ruby/object:Array {}" > >>> YAML.load s > > => [] > > Works here: > > > irb(main):001:0> a = []; a << a > > => [[...]] > > irb(main):002:0> require 'yaml' > > => true > > irb(main):003:0> a.to_yaml > > => "--- &id001 \n- *id001" > > irb(main):004:0> YAML.load(a.to_yaml) > > => [[...]] > > YAML::VERSION is 0.60. RUBY_VERSION 1.8.2. > > -- > http://flgr.0x42.net/ > you are right, it works for me too. must have made an error before.