From: Tom Cloyd Date: 2008-03-16T23:18:22+09:00 Subject: Re: argh! more undocumented mysteries: to_yaml Documentation? WHAT documentation? Please read my email. Also, replicate my example in irb - with any object you wish. (I tried Array, Fixnum, Float - all raise the same error) Finally, consider this statement from the general documentation for the Class Object at http://www.ruby-doc.org/core/: "Object is the parent class of all classes in Ruby. Its methods are therefore available to all objects unless explicitly overridden." My problem remains as I stated it. Thanks for your response, in any case. I will hold out for the possibility that with a little more examination you'll see what I have so far missed - the reason for this problem. Thanks! t. Mateusz Tybura wrote: > 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) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~