From: Mateusz Tybura Date: 2008-03-16T23:10:03+09:00 Subject: Re: argh! more undocumented mysteries: to_yaml ------=_Part_5640_26325996.1205676612966 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm beginner to but I understand it. You cannot use to_yaml for Array, because there's no method to_yaml for Array. Try to read about Object#to_yaml in Ruby Documentation. 2008/3/16, Tom Cloyd : > > Beginner woes, here, no doubt, but woes nevertheless. > > I'm exploring the wonders of the Object class, and I see Object#to_yaml. > Seems pretty obvious what to expect here, which would seem to account > for the total lack of documentation in each of the gazillion instances > of this method which appear in core library. Still, let's test it... > > irb(main):010:0> [2,5,3,6,'abc'].to_yaml > NoMethodError: undefined method `to_yaml' for [2, 5, 3, 6, "abc"]:Array > from (irb):10 > from :0 > > Can someone explain what just happened? > > Thanks! > > t. > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Tom Cloyd, MS MA, LMHC > Private practice Psychotherapist > Bellingham, Washington, U.S.A: (360) 920-1226 > << tc@tomcloyd.com >> (email) > << TomCloyd.com >> (website & psychotherapy weblog) > << sleightmind.wordpress.com >> (mental health issues weblog) > << directpathdesign.com >> (web site design & consultation) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > ------=_Part_5640_26325996.1205676612966--