From: Robert Klemme Date: 2004-03-15T03:49:35+09:00 Subject: Re: Kernel#y "Ara.T.Howard" schrieb im Newsbeitrag news:Pine.LNX.4.44.0403140908141.6230-100000@fattire.ngdc.noaa.gov... > > # Create a bunch of stuff: > > ahash = {:a => 1, 'BB' => 2, 7 => 'seven', 'd' => 10} > > astring = RUBY_VERSION + ' ' + RELEASE_DATE > > afloat = Math::PI > > anarray = ['c', 111, Exception.new('Oops')] > > > > # Bunch it more: > > anarray.push(ahash).push(astring).push(afloat) > > > > p anarray # for comparison > > puts '.'*107, '' > > > > # See what yaml's y shows > > require 'yaml' # <-------------------------# > > y anarray > > > wow. very, very cool. Hm. Where's the difference between "puts obj.to_yaml" and "y obj" apart from less typing? robert