From: Joel VanderWerf Date: 2004-03-09T15:10:41+09:00 Subject: Re: bizare yaml values Ara.T.Howard wrote: > i have tk gui which owns a config object - derived from hash. i have an > options menu configured with a callback that updates this has and another menu > that allows one to view this hash as a 'to_yaml' string. after updating it > the values seem correct (inspect) and my code works properly, however the > to_yaml output shows bizarre values where it has been updated such as > > *id001 > &id001 > > the code in question is much to long to post, but i'm wondering what the > meaning of such values might mean and what type of situation might create > them. i'm guessing it may have something to do with proc bindings and the > present value of a hash... but i'm pretty much at a loss at where to start > looking even... No worries. It's just references: irb(main):008:0> x = [] => [] irb(main):009:0> y = x => [] irb(main):010:0> z = [x,y] => [[], []] irb(main):011:0> puts z.to_yaml --- - &id001 [] - *id001 => nil Just for fun... irb(main):012:0> x = [] => [] irb(main):013:0> x << x => [[...]] irb(main):014:0> puts x.to_yaml --- &id001 - *id001 => nil